code: func (c *Candidate) Resign() {
  	c.lock.Lock()
  	defer c.lock.Unlock()
  
  	if c.leader {
  		c.resignCh <- true
  	}
  }
docs: // Resign forces the candidate to step-down and try again.
  // If the candidate is not a leader, it doesn't have any effect.
  // Candidate will retry immediately to acquire the leadership. If no-one else
  // took it, then the Candidate will end up being a leader again.