Documentation ¶
Index ¶
- Constants
- func ConcatWith(master, slave string) string
- func DeepCopy(dest, src any) (err error)
- func FileSize(path string) (int64, bool)
- func JsonInt64(val any) int64
- func MarshalJSON[T any](value T, valid bool) ([]byte, error)
- func MkdirForFile(path string) int64
- func Obj2Dict(obj any) (map[string]any, error)
- func PrintJson(data any) (err error)
- func StrToList(data []string) []any
- func UnmarshalJSON[T any](data []byte, value *T) (bool, error)
- func WrapWith(s, left, right string) string
- type NullFloat64
- type NullInt64
- type NullString
- type NullTime
Constants ¶
View Source
const ( DefaultDirMode = 0o755 DefaultFileMode = 0o644 )
Variables ¶
This section is empty.
Functions ¶
func MarshalJSON ¶ added in v1.6.1
MarshalJSON json编码
func UnmarshalJSON ¶ added in v1.6.1
UnmarshalJSON json解码
Types ¶
type NullFloat64 ¶ added in v1.6.1
type NullFloat64 struct {
sql.NullFloat64
}
NullFloat64 可空浮点数
func (*NullFloat64) MarshalJSON ¶ added in v1.6.1
func (v *NullFloat64) MarshalJSON() ([]byte, error)
func (*NullFloat64) UnmarshalJSON ¶ added in v1.6.1
func (v *NullFloat64) UnmarshalJSON(data []byte) (err error)
type NullInt64 ¶ added in v1.6.1
NullInt64 可为空整数
func (*NullInt64) MarshalJSON ¶ added in v1.6.1
func (*NullInt64) UnmarshalJSON ¶ added in v1.6.1
type NullString ¶ added in v1.6.1
type NullString struct {
sql.NullString
}
NullString 可空字符串
func (*NullString) MarshalJSON ¶ added in v1.6.1
func (v *NullString) MarshalJSON() ([]byte, error)
func (*NullString) UnmarshalJSON ¶ added in v1.6.1
func (v *NullString) UnmarshalJSON(data []byte) (err error)
Click to show internal directories.
Click to hide internal directories.