Documentation ¶
Overview ¶
Package conv contains helper functions for converting between various data types.
Index ¶
- func AddrToString(v netip.Addr) string
- func BoolArrayToString(vs []bool) []string
- func BoolToString(v bool) string
- func BytesArrayToString(vs [][]byte) []string
- func BytesToString(v []byte) string
- func Date(t time.Time) time.Time
- func DateTime(t time.Time) time.Time
- func DateTimeToString(v time.Time) string
- func DateToString(v time.Time) string
- func DurationToString(v time.Duration) string
- func Float32ArrayToString(vs []float32) []string
- func Float32ToString(v float32) string
- func Float64ArrayToString(vs []float64) []string
- func Float64ToString(v float64) string
- func Int16ToString(v int16) string
- func Int32ArrayToString(vs []int32) []string
- func Int32ToString(v int32) string
- func Int64ArrayToString(vs []int64) []string
- func Int64ToString(v int64) string
- func Int8ToString(v int8) string
- func IntToString(v int) string
- func StringArrayToString(vs []string) []string
- func StringFloat32ToString(v float32) string
- func StringFloat64ToString(v float64) string
- func StringInt16ToString(v int16) string
- func StringInt32ToString(v int32) string
- func StringInt64ToString(v int64) string
- func StringInt8ToString(v int8) string
- func StringIntToString(v int) string
- func StringToString(v string) string
- func StringUint16ToString(v uint16) string
- func StringUint32ToString(v uint32) string
- func StringUint64ToString(v uint64) string
- func StringUint8ToString(v uint8) string
- func StringUintToString(v uint) string
- func Time(t time.Time) time.Time
- func TimeArrayToString(vs []time.Time) []string
- func TimeToString(v time.Time) string
- func ToAddr(s string) (netip.Addr, error)
- func ToBool(s string) (bool, error)
- func ToBoolArray(a []string) ([]bool, error)
- func ToBytes(s string) ([]byte, error)
- func ToBytesArray(a []string) ([][]byte, error)
- func ToDate(s string) (time.Time, error)
- func ToDateTime(s string) (time.Time, error)
- func ToDuration(s string) (time.Duration, error)
- func ToFloat32(s string) (float32, error)
- func ToFloat32Array(a []string) ([]float32, error)
- func ToFloat64(s string) (float64, error)
- func ToFloat64Array(a []string) ([]float64, error)
- func ToInt(s string) (int, error)
- func ToInt16(s string) (int16, error)
- func ToInt32(s string) (int32, error)
- func ToInt32Array(a []string) ([]int32, error)
- func ToInt64(s string) (int64, error)
- func ToInt64Array(a []string) ([]int64, error)
- func ToInt8(s string) (int8, error)
- func ToString(s string) (string, error)
- func ToStringArray(a []string) ([]string, error)
- func ToStringFloat32(s string) (float32, error)
- func ToStringFloat64(s string) (float64, error)
- func ToStringInt(s string) (int, error)
- func ToStringInt16(s string) (int16, error)
- func ToStringInt32(s string) (int32, error)
- func ToStringInt64(s string) (int64, error)
- func ToStringInt8(s string) (int8, error)
- func ToStringUint(s string) (uint, error)
- func ToStringUint16(s string) (uint16, error)
- func ToStringUint32(s string) (uint32, error)
- func ToStringUint64(s string) (uint64, error)
- func ToStringUint8(s string) (uint8, error)
- func ToTime(s string) (time.Time, error)
- func ToTimeArray(a []string) ([]time.Time, error)
- func ToURL(s string) (url.URL, error)
- func ToUUID(s string) (uuid.UUID, error)
- func ToUUIDArray(a []string) ([]uuid.UUID, error)
- func ToUint(s string) (uint, error)
- func ToUint16(s string) (uint16, error)
- func ToUint32(s string) (uint32, error)
- func ToUint64(s string) (uint64, error)
- func ToUint8(s string) (uint8, error)
- func ToUnixMicro(s string) (time.Time, error)
- func ToUnixMilli(s string) (time.Time, error)
- func ToUnixNano(s string) (time.Time, error)
- func ToUnixSeconds(s string) (time.Time, error)
- func URLToString(v url.URL) string
- func UUIDArrayToString(vs []uuid.UUID) []string
- func UUIDToString(v uuid.UUID) string
- func Uint16ToString(v uint16) string
- func Uint32ToString(v uint32) string
- func Uint64ToString(v uint64) string
- func Uint8ToString(v uint8) string
- func UintToString(v uint) string
- func UnixMicroToString(v time.Time) string
- func UnixMilliToString(v time.Time) string
- func UnixNanoToString(v time.Time) string
- func UnixSecondsToString(v time.Time) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddrToString ¶ added in v0.40.0
func BoolArrayToString ¶
func BoolToString ¶
func BytesArrayToString ¶
func BytesToString ¶
func DateTimeToString ¶ added in v0.40.0
func DateToString ¶ added in v0.40.0
func DurationToString ¶
func Float32ArrayToString ¶
func Float32ToString ¶
func Float64ArrayToString ¶
func Float64ToString ¶
func Int16ToString ¶ added in v0.49.0
func Int32ArrayToString ¶
func Int32ToString ¶
func Int64ArrayToString ¶
func Int64ToString ¶
func Int8ToString ¶ added in v0.49.0
func IntToString ¶
func StringArrayToString ¶
func StringFloat32ToString ¶ added in v0.70.0
func StringFloat64ToString ¶ added in v0.70.0
func StringInt16ToString ¶ added in v0.70.0
func StringInt32ToString ¶ added in v0.40.0
func StringInt64ToString ¶ added in v0.40.0
func StringInt8ToString ¶ added in v0.70.0
func StringIntToString ¶ added in v0.70.0
func StringToString ¶
func StringUint16ToString ¶ added in v0.70.0
func StringUint32ToString ¶ added in v0.70.0
func StringUint64ToString ¶ added in v0.70.0
func StringUint8ToString ¶ added in v0.70.0
func StringUintToString ¶ added in v0.70.0
func TimeArrayToString ¶
func TimeToString ¶
func ToBoolArray ¶
func ToBytesArray ¶
func ToFloat32Array ¶
func ToFloat64Array ¶
func ToInt32Array ¶
func ToInt64Array ¶
func ToStringArray ¶
func ToStringFloat32 ¶ added in v0.70.0
func ToStringFloat64 ¶ added in v0.70.0
func ToStringInt ¶ added in v0.70.0
func ToStringInt16 ¶ added in v0.70.0
func ToStringInt32 ¶ added in v0.40.0
func ToStringInt64 ¶ added in v0.40.0
func ToStringInt8 ¶ added in v0.70.0
func ToStringUint ¶ added in v0.70.0
func ToStringUint16 ¶ added in v0.70.0
func ToStringUint32 ¶ added in v0.70.0
func ToStringUint64 ¶ added in v0.70.0
func ToStringUint8 ¶ added in v0.70.0
func URLToString ¶
func UUIDArrayToString ¶
func UUIDToString ¶
func Uint16ToString ¶ added in v0.49.0
func Uint32ToString ¶ added in v0.49.0
func Uint64ToString ¶ added in v0.49.0
func Uint8ToString ¶ added in v0.49.0
func UintToString ¶ added in v0.49.0
func UnixMicroToString ¶ added in v0.40.0
func UnixMilliToString ¶ added in v0.40.0
func UnixNanoToString ¶ added in v0.40.0
func UnixSecondsToString ¶ added in v0.40.0
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.