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 interface{}) (map[string]interface{}, error)
- func ToBool(s string) (bool, error)
- func ToBytes(value interface{}) ([]byte, error)
- func ToChar(s string) []string
- func ToFloat(value interface{}) (float64, error)
- func ToInt(value interface{}) (int64, error)
- func ToJson(value interface{}) (string, error)
- func ToString(value interface{}) 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.