code: func (d *Duration) UnmarshalText(data []byte) error { // validation is performed later on
  	dd, err := ParseDuration(string(data))
  	if err != nil {
  		return err
  	}
  	*d = Duration(dd)
  	return nil
  }
docs: // UnmarshalText hydrates this instance from text