Documentation
¶
Overview ¶
See https://github.com/dablelv/cyan/blob/master/conv/conv.go
Index ¶
- func If[T any](trueCondition bool, v1, v2 T) T
- func ToAny[T any](a any) T
- func ToAnyE[T any](a any) (T, error)
- func ToBoolE(a any) (bool, error)
- func ToDurationE(i any) (time.Duration, error)
- func ToFloat32E(i any) (float32, error)
- func ToFloat64E(i any) (float64, error)
- func ToInt16E(i any) (int16, error)
- func ToInt32E(i any) (int32, error)
- func ToInt64E(i any) (int64, error)
- func ToInt8E(i any) (int8, error)
- func ToIntE(i any) (int, error)
- func ToStringE(i any) (string, error)
- func ToUint16E(i any) (uint16, error)
- func ToUint32E(i any) (uint32, error)
- func ToUint64E(i any) (uint64, error)
- func ToUint8E(i any) (uint8, error)
- func ToUintE(i any) (uint, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ToDurationE ¶
ToDurationE casts any type to time.Duration type.
func ToFloat32E ¶
ToFloat32E casts any type to a float32 type.
func ToFloat64E ¶
ToFloat64E casts any type to a float64 type.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.