code: func parseBoundedDuration(input string, min, max time.Duration) (time.Duration, error) {
  	d, err := parseDuration(input)
  	if err != nil {
  		return 0, err
  	}
  
  	if d > max {
  		err = fmt.Errorf("duration %s longer than %s", d, max)
  	} else if d < min {
  		err = fmt.Errorf("duration %s shorter than %s", d, min)
  	}
  	return d, err
  }
docs: // parseBoundedDuration parses a time.Duration from user input and ensures that
  // it is within a given maximum and minimum time