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 ContainsString(s []string, e string) bool
- func ContainsUint(s []uint, e uint) bool
- func ConvertToString(src string, srcCode string, tagCode string) string
- func CreatNestedFile(path string) (*os.File, error)
- func Exists(name string) bool
- func If(condition bool, trueVal, falseVal interface{}) interface{}
- func IfIntArray(condition bool, trueVal, falseVal []int) []int
- func IfStringArray(condition bool, trueVal, falseVal []string) []string
- func IsEmpty(name string) (bool, error)
- func RandStringRunes(n int) string
- func Replace(table map[string]string, s string) string
- func SliceDifference(slice1, slice2 []string) []string
- func SliceIntersect(slice1, slice2 []string) []string
- 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 IfIntArray ¶
func IfStringArray ¶
func SliceDifference ¶
SliceDifference 求两个切片差集
Types ¶
Click to show internal directories.
Click to hide internal directories.