package
Version:
v1.0.12
Opens a new window with list of versions in this module.
Published: Jul 7, 2023
License: MIT
Opens a new window with license information.
Imports: 8
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
func StructToMap(value interface{}) (map[string]interface{}, error)
StructToMap convert struct to map, only convert exported struct field
map key is specified same as struct field tag `json` value
func ToBytes(data interface{}) ([]byte, error)
ToBytes convert interface to bytes
ToFloat64 convert value to a float64, if input is not a float return 0.0 and error
ToInt64 convert value to a int64, if input is not a numeric format return 0 and error
ToJson convert value to a valid json string
func ToString(value interface{}) string
ToString convert value to string
Source Files
¶
Click to show internal directories.
Click to hide internal directories.