func (s *State) VotedFor(votedFor ...int) int {
	s.mu.Lock()
	defer s.mu.Unlock()
	if len(votedFor) > 0 {
		s.votedFor = votedFor[0]
	}
	return s.votedFor
}
// VotedFor will return the states current vote or if
// an argument is passed in will set the vote
VotedFor will return the states current vote or if
an argument is passed in will set the vote
// VotedFor will return the states current vote or if // an argument is passed in will set the vote
func (s *State) VotedFor(votedFor ...int) int {
	s.mu.Lock()
	defer s.mu.Unlock()
	if len(votedFor) > 0 {
		s.votedFor = votedFor[0]
	}
	return s.votedFor
}
func ( s * State ) VotedFor ( votedFor ... int ) int { s . mu . Lock ( ) defer s . mu . Unlock ( ) if len ( votedFor ) > 0 { s . votedFor = votedFor [ 0 ] } return s . votedFor }
VotedFor will return the states current vote or if
an argument is passed in will set the vote
VotedFor will return the states current vote or if an argument is passed in will set the vote