Documentation ¶
Overview ¶
Package convertor implements some functions to convert data.
Index ¶
- func ColorHexToRGB(colorHex string) (red, green, blue int)
- func ColorRGBToHex(red, green, blue int) string
- func StructToMap(value any) (map[string]any, error)
- func ToBool(s string) (bool, error)
- func ToBytes(value any) ([]byte, error)
- func ToChar(s string) []string
- func ToFloat(value any) (float64, error)
- func ToInt(value any) (int64, error)
- func ToJson(value any) (string, error)
- func ToString(value any) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ColorHexToRGB ¶
ColorHexToRGB convert hex color to rgb color
func ColorRGBToHex ¶
ColorRGBToHex convert rgb color to hex color
func StructToMap ¶
StructToMap convert struct to map, only convert exported struct field map key is specified same as struct field tag `json` value
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.