code: func (m *Manager) getLeaderNodeID() string {
  	// get the current leader ID. this variable tracks the leader *only* for
  	// the purposes of logging leadership changes, and should not be relied on
  	// for other purposes
  	leader, leaderErr := m.raftNode.Leader()
  	switch leaderErr {
  	case raft.ErrNoRaftMember:
  		// this is an unlikely case, but we have to handle it. this means this
  		// node is not a member of the raft quorum. this won't look very pretty
  		// in logs ("leadership changed from aslkdjfa to ErrNoRaftMember") but
  		// it also won't be very common
  		return "not yet part of a raft cluster"
  	case raft.ErrNoClusterLeader:
  		return "no cluster leader"
  	default:
  		id, err := m.raftNode.GetNodeIDByRaftID(leader)
  		// the only possible error here is "ErrMemberUnknown"
  		if err != nil {
  			return "an unknown node"
  		}
  		return id
  	}
  }
docs: // getLeaderNodeID is a small helper function returning a string with the
  // leader's node ID. it is only used for logging, and should not be relied on
  // to give a node ID for actual operational purposes (because it returns errors
  // as nicely decorated strings)