Documentation
¶
Index ¶
- func BoolToString(b bool) string
- func Float64ToInt(f float64) int
- func Float64ToString(f float64) string
- func GetBoolValue(ptr *bool) bool
- func GetByteValue(ptr *byte) byte
- func GetComplex64Value(ptr *complex64) complex64
- func GetComplex128Value(ptr *complex128) complex128
- func GetFloat32Value(ptr *float32) float32
- func GetFloat64Value(ptr *float64) float64
- func GetInt8Value(ptr *int8) int8
- func GetInt16Value(ptr *int16) int16
- func GetInt32Value(ptr *int32) int32
- func GetInt64Value(ptr *int64) int64
- func GetIntValue(ptr *int) int
- func GetRuneValue(ptr *rune) rune
- func GetStringValue(ptr *string) string
- func GetTimeValue(ptr *time.Time) time.Time
- func GetUUIDValue(ptr *uuid.UUID) uuid.UUID
- func GetUint8Value(ptr *uint8) uint8
- func GetUint16Value(ptr *uint16) uint16
- func GetUint32Value(ptr *uint32) uint32
- func GetUint64Value(ptr *uint64) uint64
- func GetUintValue(ptr *uint) uint
- func Int64ToInt(i int64) int
- func Int64ToString(i int64) string
- func IntToFloat64(i int) float64
- func IntToInt64(i int) int64
- func IntToString(i int) string
- func NewUUID() uuid.UUID
- func PointerBool(prm bool) *bool
- func PointerByte(prm byte) *byte
- func PointerComplex64(prm complex64) *complex64
- func PointerComplex128(prm complex128) *complex128
- func PointerFloat32(prm float32) *float32
- func PointerFloat64(prm float64) *float64
- func PointerInt(prm int) *int
- func PointerInt8(prm int8) *int8
- func PointerInt16(prm int16) *int16
- func PointerInt32(prm int32) *int32
- func PointerInt64(prm int64) *int64
- func PointerRune(prm rune) *rune
- func PointerString(prm string) *string
- func PointerTime(prm time.Time) *time.Time
- func PointerUUID(id uuid.UUID) *uuid.UUID
- func PointerUint(prm uint) *uint
- func PointerUint8(prm uint8) *uint8
- func PointerUint16(prm uint16) *uint16
- func PointerUint32(prm uint32) *uint32
- func PointerUint64(prm uint64) *uint64
- func SafeGetBoolValue(m map[string]interface{}, key string, defaultValue bool) bool
- func SafeGetFloat64Value(m map[string]interface{}, key string, defaultValue float64) float64
- func SafeGetInt64Value(m map[string]interface{}, key string, defaultValue int64) int64
- func SafeGetIntValue(m map[string]interface{}, key string, defaultValue int) int
- func SafeGetStringValue(m map[string]interface{}, key string, defaultValue string) string
- func SafeGetValue(m map[string]interface{}, key string, defaultValue interface{}) interface{}
- func StringToBool(s string) (bool, error)
- func StringToFloat64(s string) (float64, error)
- func StringToInt(s string) (int, error)
- func StringToInt64(s string) (int64, error)
- func StringToTime(s, layout string) (time.Time, error)
- func StringToUUID(s string) (uuid.UUID, error)
- func TimeToString(t time.Time, layout string) string
- func ToBool(v interface{}) (bool, error)
- func ToFloat64(v interface{}) (float64, error)
- func ToInt(v interface{}) (int, error)
- func ToInt64(v interface{}) (int64, error)
- func ToString(v interface{}) string
- func ToUUID(v interface{}) (uuid.UUID, error)
- func UUIDToString(u uuid.UUID) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BoolToString ¶ added in v1.0.2
BoolToString converts a bool to a string
func Float64ToInt ¶ added in v1.0.2
Float64ToInt converts a float64 to an int
func Float64ToString ¶ added in v1.0.2
Float64ToString converts a float64 to a string
func GetBoolValue ¶ added in v1.0.1
GetBoolValue returns the value of a bool pointer.
func GetByteValue ¶ added in v1.0.1
GetByteValue returns the value of a byte pointer.
func GetComplex64Value ¶ added in v1.0.1
GetComplex64Value returns the value of a complex64 pointer.
func GetComplex128Value ¶ added in v1.0.1
func GetComplex128Value(ptr *complex128) complex128
GetComplex128Value returns the value of a complex128 pointer.
func GetFloat32Value ¶ added in v1.0.1
GetFloat32Value returns the value of a float32 pointer.
func GetFloat64Value ¶ added in v1.0.1
GetFloat64Value returns the value of a float64 pointer.
func GetInt8Value ¶ added in v1.0.1
GetInt8Value returns the value of an int8 pointer.
func GetInt16Value ¶ added in v1.0.1
GetInt16Value returns the value of an int16 pointer.
func GetInt32Value ¶ added in v1.0.1
GetInt32Value returns the value of an int32 pointer.
func GetInt64Value ¶ added in v1.0.1
GetInt64Value returns the value of an int64 pointer.
func GetIntValue ¶ added in v1.0.1
GetIntValue returns the value of an int pointer.
func GetRuneValue ¶ added in v1.0.1
GetRuneValue returns the value of a rune pointer.
func GetStringValue ¶ added in v1.0.1
GetStringValue returns the value of a string pointer.
func GetTimeValue ¶ added in v1.0.2
GetRuneValue returns the value of a rune pointer.
func GetUUIDValue ¶ added in v1.0.1
GetUUIDValue returns the value of a uuid.UUID pointer.
func GetUint8Value ¶ added in v1.0.1
GetUint8Value returns the value of a uint8 pointer.
func GetUint16Value ¶ added in v1.0.1
GetUint16Value returns the value of a uint16 pointer.
func GetUint32Value ¶ added in v1.0.1
GetUint32Value returns the value of a uint32 pointer.
func GetUint64Value ¶ added in v1.0.1
GetUint64Value returns the value of a uint64 pointer.
func GetUintValue ¶ added in v1.0.1
GetUintValue returns the value of a uint pointer.
func Int64ToInt ¶ added in v1.0.2
Int64ToInt converts an int64 to an int
func Int64ToString ¶ added in v1.0.2
Int64ToString converts an int64 to a string
func IntToFloat64 ¶ added in v1.0.2
IntToFloat64 converts an int to a float64
func IntToInt64 ¶ added in v1.0.2
IntToInt64 converts an int to an int64
func IntToString ¶ added in v1.0.2
IntToString converts an int to a string
func PointerBool ¶
PointerBool returns a pointer to the given bool. It is useful for creating pointers to bool values.
func PointerByte ¶
PointerByte returns a pointer to the given byte. It is useful for creating pointers to byte values.
func PointerComplex64 ¶
PointerComplex64 returns a pointer to the given complex64. It is useful for creating pointers to complex64 values.
func PointerComplex128 ¶
func PointerComplex128(prm complex128) *complex128
PointerComplex128 returns a pointer to the given complex128. It is useful for creating pointers to complex128 values.
func PointerFloat32 ¶
PointerFloat32 returns a pointer to the given float32. It is useful for creating pointers to float32 values.
func PointerFloat64 ¶
PointerFloat64 returns a pointer to the given float64. It is useful for creating pointers to float64 values.
func PointerInt ¶
PointerInt returns a pointer to the given int. It is useful for creating pointers to int values.
func PointerInt8 ¶
PointerInt8 returns a pointer to the given int8. It is useful for creating pointers to int8 values.
func PointerInt16 ¶
PointerInt16 returns a pointer to the given int16. It is useful for creating pointers to int16 values.
func PointerInt32 ¶
PointerInt32 returns a pointer to the given int32. It is useful for creating pointers to int32 values.
func PointerInt64 ¶
PointerInt64 returns a pointer to the given int64. It is useful for creating pointers to int64 values.
func PointerRune ¶
PointerRune returns a pointer to the given rune. It is useful for creating pointers to rune values.
func PointerString ¶
PointerString returns a pointer to the given string. It is useful for creating pointers to string values.
func PointerTime ¶ added in v1.0.2
PointerTime returns a pointer to the given time. It is useful for creating pointers to time values.
func PointerUUID ¶
PointerUUID returns a pointer to the given UUID. It is useful for creating pointers to UUID values.
func PointerUint ¶
PointerUint returns a pointer to the given uint. It is useful for creating pointers to uint values.
func PointerUint8 ¶
PointerUint8 returns a pointer to the given uint8. It is useful for creating pointers to uint8 values.
func PointerUint16 ¶
PointerUint16 returns a pointer to the given uint16. It is useful for creating pointers to uint16 values.
func PointerUint32 ¶
PointerUint32 returns a pointer to the given uint32. It is useful for creating pointers to uint32 values.
func PointerUint64 ¶
PointerUint64 returns a pointer to the given uint64. It is useful for creating pointers to uint64 values.
func SafeGetBoolValue ¶
SafeGetBoolValue safely retrieves a bool value from a map by key. If the key is not found or the value is not a bool, it returns the default value.
func SafeGetFloat64Value ¶
SafeGetFloat64Value safely retrieves a float64 value from a map by key. If the key is not found or the value is not a float64, it returns the default value.
func SafeGetInt64Value ¶
SafeGetInt64Value safely retrieves an int64 value from a map by key. If the key is not found or the value is not an int64, it returns the default value.
func SafeGetIntValue ¶
SafeGetIntValue safely retrieves an int value from a map by key. If the key is not found or the value is not an int, it returns the default value.
func SafeGetStringValue ¶
SafeGetStringValue safely retrieves a string value from a map by key. If the key is not found or the value is not a string, it returns the default value.
func SafeGetValue ¶
SafeGetValue safely retrieves a value of any type from a map by key. If the key is not found or the value cannot be cast to the desired type, it returns the default value.
func StringToBool ¶ added in v1.0.2
StringToBool converts a string to a bool
func StringToFloat64 ¶ added in v1.0.2
StringToFloat64 converts a string to a float64
func StringToInt ¶ added in v1.0.2
StringToInt converts a string to an int
func StringToInt64 ¶ added in v1.0.2
StringToInt64 converts a string to an int64
func StringToTime ¶ added in v1.0.2
StringToTime converts a string to a time.Time The layout parameter specifies the format of the input string
func StringToUUID ¶ added in v1.0.2
StringToUUID converts a string to a UUID
func TimeToString ¶ added in v1.0.2
TimeToString converts a time.Time to a string The layout parameter specifies the desired output format
func UUIDToString ¶ added in v1.0.2
UUIDToString converts a UUID to a string
Types ¶
This section is empty.