Documentation ¶
Index ¶
- Constants
- func GetTodayYMD(sep string) string
- func IsExist(path string) bool
- func JSON2Struct(m map[interface{}]interface{}, target interface{}) error
- func NewRand(size int) int
- func OpenFileSafety(pathname string, flag int, perm os.FileMode) (f *os.File, err error)
- func ParseEnvForTag(a interface{}, tagName string) (err error)
- func Str2IntForMonth(month string) int
- func String2Int(s string) int
- func Struct2Json(strut interface{}) (map[string]interface{}, error)
- func Struct2Map(a interface{}) map[string]interface{}
- func Struct2MapFromTag(a interface{}) map[string]interface{}
- func StructCopy(from interface{}, to interface{}) error
- type UUID
Constants ¶
View Source
const (
MAP_TAG_NAME = "map"
)
View Source
const Size = 16
Variables ¶
This section is empty.
Functions ¶
func JSON2Struct ¶
func JSON2Struct(m map[interface{}]interface{}, target interface{}) error
json映射 -> struct
func OpenFileSafety ¶
func String2Int ¶
func Struct2Json ¶
strut -> json
func Struct2MapFromTag ¶
func Struct2MapFromTag(a interface{}) map[string]interface{}
根据tag struct -> map
Types ¶
Click to show internal directories.
Click to hide internal directories.