ParseValue parses value to generic type Types that are supported: - bool - float32 - float64 - int - int8 - int16 - int32 - int64 - uint - uint8/byte - uint16 - uint32 - uint64 - string - echo.BindUnmarshaler interface - encoding.TextUnmarshaler interface - json.Unmarshaler interface - time.Duratio
(value string, opts ...any)
| 364 | // - time.Duration |
| 365 | // - time.Time use echo.TimeOpts or echo.TimeLayout to set time parsing configuration |
| 366 | func ParseValue[T any](value string, opts ...any) (T, error) { |
| 367 | var zero T |
| 368 | return ParseValueOr(value, zero, opts...) |
| 369 | } |
| 370 | |
| 371 | // ParseValueOr parses value to generic type, when value is empty defaultValue is returned. |
| 372 | // |
searching dependent graphs…