Documentation ¶
Index ¶
- Constants
- Variables
- func BuildConcat(str1, str2 string, DBType string) string
- func BuildLogger(level string)
- func BuildRegexp(search []string, prefix, suffix, condition string) string
- func ClearSession(c *gin.Context)
- func ContainsString(s []string, e string) bool
- func ContainsUint(s []uint, e uint) bool
- func CreatNestedFile(path string) (*os.File, error)
- func DeleteSession(c *gin.Context, key string)
- func DotPathToStandardPath(path string) string
- func EncodeUrl(name string) string
- func Exists(name string) bool
- func FillSlash(path string) string
- func FormSlash(old string) string
- func GenSnowflakeID(startTime string, machineID int64) (int64, error)
- func Get24Time(d time.Time) time.Time
- func GetFirstDateOfMonth(d time.Time) time.Time
- func GetFirstDateOfYear(d time.Time) time.Time
- func GetLastDateOfMonth(d time.Time) time.Time
- func GetLastDateOfYear(d time.Time) time.Time
- func GetMonthDays(year int, month int) int
- func GetSession(c *gin.Context, key string) interface{}
- func GetStrongPasswordString(l int) string
- func GetStructTagValue(MyStruct interface{}, tagName, fieldName string) (string, error)
- func GetZeroTime(d time.Time) time.Time
- func Init(startTime string, machineID int64) (err error)
- func IsEmpty(name string) (bool, error)
- func IsLeapYear(year int) bool
- func NewJsonTag(tagName string) jsoniter.API
- func ParamIsNull(param string) error
- func RandStringRunes(n int) string
- func RelativePath(name string) string
- func RemoveSlash(path string) string
- func Replace(table map[string]string, s string) string
- func SetSession(c *gin.Context, list map[string]interface{})
- func SliceDifference(slice1, slice2 []string) []string
- func SliceIntersect(slice1, slice2 []string) []string
- func SplitPath(path string) []string
- func SqlLikePaste(keyStr string) string
- func StrSplitAny(s string, seps string) []string
- func TimeStringToGoTime(tm string) time.Time
- type Logger
- func (ll *Logger) Debug(format string, v ...interface{})
- func (ll *Logger) Error(format string, v ...interface{})
- func (ll *Logger) Info(format string, v ...interface{})
- func (ll *Logger) Panic(format string, v ...interface{})
- func (ll *Logger) Println(prefix string, msg string)
- func (ll *Logger) Warning(format string, v ...interface{})
Constants ¶
View Source
const ( // LevelError 错误 LevelError = iota // LevelWarning 警告 LevelWarning // LevelInformational 提示 LevelInformational // LevelDebug 除错 LevelDebug )
Variables ¶
View Source
var Level = LevelDebug
Functions ¶
func BuildConcat ¶
BuildConcat 根据数据库类型构建字符串连接表达式
func BuildRegexp ¶
BuildRegexp 构建用于SQL查询用的多条件正则
func CreatNestedFile ¶
CreatNestedFile 给定path创建文件,如果目录不存在就递归创建
func DotPathToStandardPath ¶
DotPathToStandardPath 将","分割的路径转换为标准路径
func GenSnowflakeID ¶
生成 64 位的 雪花 ID
func GetFirstDateOfMonth ¶
获取传入的时间所在月份的第一天,即某月第一天的0点。如传入time.Now(), 返回当前月份的第一天0点时间。
func GetLastDateOfMonth ¶
获取传入的时间所在月份的最后一天,即某月最后一天的0点。如传入time.Now(), 返回当前月份的最后一天0点时间。
func GetStructTagValue ¶
根据struct获取 tag 名称
func NewJsonTag ¶
func SliceDifference ¶
SliceDifference 求两个切片差集
Types ¶
Click to show internal directories.
Click to hide internal directories.