Documentation ¶
Index ¶
- Constants
- Variables
- func ContainsString(arr []string, str string) bool
- func Float32(v float32) *float32
- func Float64(v float64) *float64
- func GenerateID() string
- func InStringSlice(str string, arr []string) bool
- func InUintSlice(num uint, arr []uint) bool
- func Int(v int) *int
- func Int64(v int64) *int64
- func Int8(v int8) *int8
- func MustString(s interface{}) string
- func String(v string) *string
- func Time(t time.Time) *time.Time
- func Uint(v uint) *uint
- func Uint8(v uint8) *uint8
- type AppletTime
- type Bool
- type Money
- func (m Money) Abs() Money
- func (m Money) Add(a Money) Money
- func (m Money) Ceil() Money
- func (m Money) Div(a float64) Money
- func (m Money) Equal(b Money) bool
- func (m Money) Floor() Money
- func (m Money) GreaterZero() bool
- func (m Money) IsZero() bool
- func (m Money) Less(a Money) bool
- func (m Money) LessZero() bool
- func (m Money) MarshalJSON() ([]byte, error)
- func (m Money) Mul(a float64) Money
- func (m Money) String() string
- func (m Money) Sub(a Money) Money
- func (m Money) ToUpper() string
- func (m Money) Val() float64
- type Password
- type SafeID
- type Secret
- type StringArray
- func (i StringArray) First() string
- func (i StringArray) MarshalJSON() ([]byte, error)
- func (i StringArray) MarshalYAML() (interface{}, error)
- func (i StringArray) Slice() (arr []string)
- func (i *StringArray) UnmarshalJSON(data []byte) error
- func (i *StringArray) UnmarshalYAML(unmarshal func(interface{}) error) error
Constants ¶
View Source
const (
// AppletTimeFormat 小程序时间格式
AppletTimeFormat = "2006-01-02T15:04:05.000Z"
)
Variables ¶
BoolName 对应关系
Functions ¶
func ContainsString ¶
ContainsString 判断字符串是否在字符串数组中
func Int ¶
Int is a helper routine that allocates a new int32 value to store v and returns a pointer to it, but unlike Int32 its argument value is an int.
func String ¶
String is a helper routine that allocates a new string value to store v and returns a pointer to it.
Types ¶
type AppletTime ¶
小程序时间
func (AppletTime) MarshalJSON ¶
func (t AppletTime) MarshalJSON() ([]byte, error)
MarshalJSON 实现json序列化接口
func (*AppletTime) UnmarshalJSON ¶
func (t *AppletTime) UnmarshalJSON(data []byte) error
UnmarshalJSON 实现json反序列化接口
type Bool ¶
type Bool int32
Bool gorm bool gorm:"column:xxxx;type:TINYINT;default:-1"
func (*Bool) UnmarshalYAML ¶
UnmarshalYAML .
type StringArray ¶
type StringArray string
StringArray 字符串数组,用于Mysql数据库和接口之间的转换
func New ¶
func New(v ...string) StringArray
func (StringArray) First ¶
func (i StringArray) First() string
func (StringArray) MarshalYAML ¶
func (i StringArray) MarshalYAML() (interface{}, error)
MarshalYAML .
func (*StringArray) UnmarshalJSON ¶
func (i *StringArray) UnmarshalJSON(data []byte) error
UnmarshalJSON .
func (*StringArray) UnmarshalYAML ¶
func (i *StringArray) UnmarshalYAML(unmarshal func(interface{}) error) error
UnmarshalYAML .
Click to show internal directories.
Click to hide internal directories.