Documentation ¶
Index ¶
- func Deserialize(jsonStr string) interface{}
- func FileExists(name string) bool
- func GenDate() string
- func GenSpecialTimestamp(fullTimeStr string) (string, error)
- func GenSpecialTimestampAfterSeconds(timestamp string, seconds int64) (string, error)
- func GenSpecialTimestampAfterSecondsWithFullTimeStr(fullTimeStr string, seconds int64) (string, error)
- func GenTimestamp() string
- func GetCurrentDirectory() string
- func GetParentDirectory(dirctory string) string
- func MapToStruct(mapObj map[string]interface{}) (interface{}, error)
- func RandInt(min int, max int) int
- func Serialize(obj interface{}, escapeHTML ...bool) string
- func SerializePretty(obj interface{}, escapeHTML ...bool) string
- func StructSerialize(obj interface{}, escapeHTML ...bool) string
- func StructSerializePretty(obj interface{}, escapeHTML ...bool) string
- func StructToMap(obj interface{}) (map[string]interface{}, error)
- func Try(execFunc func(), afterPanic func(interface{}))
- func TypeToString(name interface{}) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Deserialize ¶
func Deserialize(jsonStr string) interface{}
func FileExists ¶
FileExists reports whether the named file or directory exists.
func GenSpecialTimestamp ¶
func GenTimestamp ¶
func GenTimestamp() string
func GetCurrentDirectory ¶
func GetCurrentDirectory() string
func GetParentDirectory ¶
func MapToStruct ¶
func Serialize ¶
------------- Structs keys are marshalled in the order defined in the struct ------------------
func SerializePretty ¶
only for selfTest, format json output
func StructSerialize ¶
The json package always orders keys when marshalling. Specifically:
Maps have their keys sorted lexicographically. Structs keys are marshalled in the order defined in the struct
------------------------------ struct serialize must use this ----------------------------- ------------------------------ Hash and Sign use this -----------------------------
func StructSerializePretty ¶
only for selfTest, format json output
func StructToMap ¶
func Try ¶
func Try(execFunc func(), afterPanic func(interface{}))
* try...catch * \param [in] * \return
func TypeToString ¶
func TypeToString(name interface{}) string
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.