func (d *Dinghy) StepDownHandler() func(w http.ResponseWriter, r *http.Request) {
	return func(w http.ResponseWriter, r *http.Request) {
		if r.Method != "PUT" {
			http.Error(w, http.StatusText(http.StatusMethodNotAllowed), http.StatusMethodNotAllowed)
			return
		}
		d.State.State(StateFollower)
		fmt.Fprintln(w, d.State)
	}
}
// StepDownHandler (POST) will force the node to step down to a follower state.
StepDownHandler (POST) will force the node to step down to a follower state.
// StepDownHandler ( POST ) will force the node to step down to a follower state .
func (d *Dinghy) StepDownHandler() func(w http.ResponseWriter, r *http.Request) {
	return func(w http.ResponseWriter, r *http.Request) {
		if r.Method != "PUT" {
			http.Error(w, http.StatusText(http.StatusMethodNotAllowed), http.StatusMethodNotAllowed)
			return
		}
		d.State.State(StateFollower)
		fmt.Fprintln(w, d.State)
	}
}
func ( d * Dinghy ) StepDownHandler ( ) func ( w http . ResponseWriter , r * http . Request ) { return func ( w http . ResponseWriter , r * http . Request ) { if r . Method != " " { http . Error ( w , http . StatusText ( http . StatusMethodNotAllowed ) , http . StatusMethodNotAllowed ) return } d . State . State ( StateFollower ) fmt . Fprintln ( w , d . State ) } }
StepDownHandler (POST) will force the node to step down to a follower state.
StepDownHandler ( POST ) will force the node to step down to a follower state .