Documentation
¶
Index ¶
- Constants
- func AppendToSlice[T SliceType](target []T, s ...T) []T
- func NewSlice[T SliceType](s ...T) []T
- func ScanSlice[T SliceType](v interface{}) ([]T, error)
- type Datetime
- func (d Datetime) Format(s string) string
- func (d *Datetime) GetLayout() string
- func (d Datetime) MarshalBinary() ([]byte, error)
- func (d Datetime) MarshalText() ([]byte, error)
- func (d *Datetime) Scan(v interface{}) error
- func (d *Datetime) SetLayout(s string) *Datetime
- func (d Datetime) String() string
- func (d *Datetime) UnmarshalBinary(b []byte) error
- func (d *Datetime) UnmarshalText(b []byte) error
- func (d Datetime) Value() (driver.Value, error)
- type Int64Slice
- type MapInt64String
- type SliceType
- type StringSlice
Constants ¶
View Source
const ( DatetimeLayout = "2006-01-02 15:04:05" DatetimeLayoutWithSlash = "2006/01/02 15:04:05" DateLayout = "2006-01-02" DateLayoutWithSlash = "2006/01/02" DateLayout1 = "01/02/2006" )
Variables ¶
This section is empty.
Functions ¶
func AppendToSlice ¶
func AppendToSlice[T SliceType](target []T, s ...T) []T
Types ¶
type Datetime ¶
func NewDatetime ¶
func NewDatetime(t ...interface{}) *Datetime
NewDatetime 不指定参数则用当前时间和默认格式,t[0]:可选,格式化的时间字符串,t[1]:可选解析的格式
func (Datetime) MarshalBinary ¶
func (Datetime) MarshalText ¶
func (*Datetime) UnmarshalBinary ¶
func (*Datetime) UnmarshalText ¶
type Int64Slice ¶
type Int64Slice []int64
func NewInt64Slice ¶
func NewInt64Slice(data ...int64) *Int64Slice
func (*Int64Slice) Append ¶
func (d *Int64Slice) Append(v ...int64)
func (Int64Slice) Len ¶
func (d Int64Slice) Len() int
func (*Int64Slice) Scan ¶
func (d *Int64Slice) Scan(v interface{}) (err error)
type MapInt64String ¶
func (*MapInt64String) Scan ¶
func (d *MapInt64String) Scan(v interface{}) (err error)
type StringSlice ¶
type StringSlice []string
func NewStringSlice ¶
func NewStringSlice(data ...string) *StringSlice
func (*StringSlice) Append ¶
func (d *StringSlice) Append(v ...string)
func (StringSlice) Len ¶
func (d StringSlice) Len() int
func (*StringSlice) Scan ¶
func (d *StringSlice) Scan(v interface{}) (err error)
Click to show internal directories.
Click to hide internal directories.