code: func StringFlagPutHandler(setter StringFlagSetterFunc) http.HandlerFunc {
  	return http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) {
  		switch {
  		case req.Method == "PUT":
  			body, err := ioutil.ReadAll(req.Body)
  			if err != nil {
  				writePlainText(http.StatusBadRequest, "error reading request body: "+err.Error(), w)
  				return
  			}
  			defer req.Body.Close()
  			response, err := setter(string(body))
  			if err != nil {
  				writePlainText(http.StatusBadRequest, err.Error(), w)
  				return
  			}
  			writePlainText(http.StatusOK, response, w)
  			return
  		default:
  			writePlainText(http.StatusNotAcceptable, "unsupported http method", w)
  			return
  		}
  	})
  }
docs: // StringFlagPutHandler wraps an http Handler to set string type flag.