code: func durationParam(req *http.Request, param string) (time.Duration, bool, error) {
  	q := req.URL.Query()
  	t := strings.TrimSpace(q.Get(param))
  	if t == "" {
  		return 0, false, nil
  	}
  	dur, err := time.ParseDuration(t)
  	if err != nil {
  		return 0, false, err
  	}
  	return dur, true, nil
  }
docs: // durationParam returns the duration of the given query param, if set.