Documentation ¶
Index ¶
- Constants
- func AppendInt(list []int, target int, ifAbsent bool) []int
- func AppendInt64(list []int64, target int64, ifAbsent bool) []int64
- func AppendStr(list []string, target string, ifAbsent bool) []string
- func Contains(obj interface{}, target interface{}) bool
- func Contains2(obj interface{}, target interface{}) bool
- func CurrentTimeMillis() int64
- func GenerateCode(size int) string
- func GetGID() uint64
- func GetStringParamsMapFromUrl(paramsStr string) map[string]string
- func GetValidDate(validTime time.Duration) time.Time
- func IsIdNoCorrect(idNo string) bool
- func LocalIP() string
- func Marshal(obj interface{}) ([]byte, error)
- func MarshalToString(obj interface{}) (string, error)
- func Mask(str string, before int, after int) string
- func NewOptions(config cc.IConfig, opts interface{})
- func ReadFile(localFile string) ([]byte, error)
- func RemoveDuplicateInt(list []int) []int
- func RemoveDuplicateInt64(list []int64) []int64
- func RemoveDuplicateStr(list []string) []string
- func SubStr(str string, start int, length int) (result string)
- func Unmarshal(bytes []byte, obj interface{}) error
- func UnmarshalFromString(str string, obj interface{}) error
- func Uuid() string
- func VerifyEmailFormat(email string) bool
- type DateTime
- type Error
Constants ¶
View Source
const ( TimeFormat = "2006-01-02 15:04:05" TimeFormatZero = "0001-01-01 00:00:00" )
View Source
const ( REGX_ID_PATTERN_15 = "^[1-9]\\d{7}((0\\d)|(1[0-2]))(([0|1|2]\\d)|3[0-1])\\d{3}$" REGX_ID_PATTERN_18 = "^[1-9]\\d{5}[1-9]\\d{3}((0\\d)|(1[0-2]))(([0|1|2]\\d)|3[0-1])\\d{3}([0-9]|X)$" )
Variables ¶
This section is empty.
Functions ¶
func AppendInt64 ¶ added in v0.2.13
func Contains ¶
func Contains(obj interface{}, target interface{}) bool
判断obj是否在target中,target支持的类型arrary,slice,map
func CurrentTimeMillis ¶
func CurrentTimeMillis() int64
func GenerateCode ¶
func IsIdNoCorrect ¶
func MarshalToString ¶
func NewOptions ¶
func RemoveDuplicateInt ¶ added in v0.2.13
func RemoveDuplicateInt64 ¶ added in v0.2.13
func RemoveDuplicateStr ¶ added in v0.2.13
func UnmarshalFromString ¶
func VerifyEmailFormat ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.