Versions in this module Expand all Collapse all v1 v1.1.0 Dec 5, 2018 Changes in this version type S + func (s S) Bytes() []byte + func (s S) ToJSON(v interface{}) error v1.0.0 Nov 30, 2018 Changes in this version + const ContextKeyTraceID + const ContextKeyURLMemo + const ContextKeyUserID + const DebugMode + const ReleaseMode + const SessionKeyUserID + const TestMode + var ErrNotFound = errors.New("未找到资源") + var JSONMarshal = json.Marshal + var JSONMarshalIndent = json.MarshalIndent + var JSONNewDecoder = json.NewDecoder + var JSONNewEncoder = json.NewEncoder + var JSONUnmarshal = json.Unmarshal + func ConvertToViewTree(treeDatas []map[string]interface{}, labelField, valueField, keyField string) []map[string]interface + func FromTraceIDContext(ctx context.Context) string + func FromUserIDContext(ctx context.Context) string + func GetLevelCode(orderLevelCodes []string) string + func JSONMarshalToString(v interface{}) string + func MD5Hash(b []byte) string + func MD5HashString(s string) string + func MustUUID() string + func NewTraceIDContext(ctx context.Context, traceID string) context.Context + func NewUUID() (string, error) + func NewUserIDContext(ctx context.Context, userID string) context.Context + func ParseLevelCodes(levelCodes ...string) []string + func SHA1Hash(b []byte) string + func SHA1HashString(s string) string + func Slice2Tree(sliceDatas []map[string]interface{}, idField, pidField string) []map[string]interface + func StructToMap(s interface{}) map[string]interface + func StructsToMapSlice(v interface{}) []map[string]interface + func Trim(s string) string + type S string + func (s S) Float64() float64 + func (s S) Int() int + func (s S) Int64() int64 + func (s S) String() string + func (s S) Uint() uint + func (s S) Uint64() uint64 + type V interface + Bool func() bool + Bytes func() []byte + Float64 func() float64 + Int func() int + Int64 func() int64 + String func() string + Uint func() uint + Uint64 func() uint64 + func T(v interface{}) V