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 Exists(name string) bool
- func FillSlash(path string) string
- func FormSlash(old string) string
- func GetSession(c *gin.Context, key string) interface{}
- func IsEmpty(name string) (bool, error)
- func IsInExtensionList(extList []string, fileName string) bool
- 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
- 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 IsInExtensionList ¶
IsInExtensionList 返回文件的扩展名是否在给定的列表范围内
func SliceDifference ¶
SliceDifference 求两个切片差集
Types ¶
Click to show internal directories.
Click to hide internal directories.