Documentation ¶
Index ¶
- Constants
- func AddUniq(list []string, arg ...string) []string
- func BeginEnd(begin, end func()) func()
- func CSV(file string, limit int, ...) error
- func Capital(str string) string
- func Close(p interface{})
- func Contains(str, sub Any) bool
- func Create(p string) (*os.File, string, error)
- func DayBegin(t string) time.Time
- func Default(list []string, arg ...string) []string
- func Duration(str Any) time.Duration
- func Env(key string) string
- func EnvSimple(arg ...string) []string
- func Ext(str string) string
- func ExtChange(file, ext string) string
- func ExtIsImage(str string) bool
- func ExtIsVideo(str string) bool
- func ExtReg(ext string) string
- func Fields(arg ...Any) string
- func FileExists(name string) bool
- func FileLine(p interface{}, n int) string
- func FileName(p interface{}) string
- func FileReg(ext ...string) string
- func Filter(arg []string, cb ...func(string) bool) (res []string)
- func Filters(list []string, arg ...string) (res []string)
- func FmtDuration(t time.Duration) string
- func FmtSize(size int64) string
- func ForEach(arg []string, cb func(string))
- func Format(val Any, arg ...Any) string
- func FormatKV(data Map, args ...string) string
- func FormatShow(arg ...Any) string
- func Formats(val Any) string
- func FuncAddr(p interface{}) uintptr
- func FuncName(p interface{}) string
- func GetValid(cb ...func() string) (res string)
- func HasPrefix(text string, arg ...string) bool
- func HasSuffix(text string, arg ...string) bool
- func Hash(arg ...Any) (string, []string)
- func Hashs(arg ...Any) string
- func HashsPath(arg ...Any) string
- func HomePath(str string, rest ...string) string
- func If(exp Any, cb ...func())
- func IfNoKey(list Map, p string, cb func(string))
- func IndexOf(str []string, sub string) int
- func Int(val Any) int
- func Int64(val Any) int64
- func IsDir(p string) bool
- func Join(str []string, arg ...string) string
- func JoinKV(inner, outer string, arg ...string) string
- func KeyExtra(arg ...Any) string
- func KeyHash(arg ...Any) string
- func Keycb(arg ...Any) string
- func Keym(arg ...Any) string
- func Keys(arg ...Any) string
- func LowerCapital(str string) string
- func Max(list ...int) (max int)
- func MergePOD(url string, pod string, arg ...Any) string
- func MergeURL(str string, arg ...Any) string
- func MergeURL2(str string, uri string, arg ...Any) string
- func Min(arg ...int) (res int)
- func ModName(p interface{}) string
- func ModPath(p interface{}, arg ...string) string
- func Now(arg ...string) string
- func ParseQuery(str string) url.Values
- func ParseURL(str string) *url.URL
- func ParseURLMap(str string) map[string]string
- func Path(str string, rest ...string) string
- func PathName(p interface{}) string
- func Pwd() string
- func QueryUnescape(value string) string
- func ReadFile(p string) string
- func Reflect(obj Any, cb func(name string, value Any)) (reflect.Type, reflect.Value)
- func Regexp(arg string) *regexp.Regexp
- func Render(str string, arg Any) (b []byte, e error)
- func Renders(str string, arg Any) string
- func Replace(str string, arg ...string) string
- func ReplaceAll(str string, arg ...string) string
- func Revert(str []string) []string
- func Rewrite(file string, cb func(string) string) error
- func Select(def string, arg ...Any) string
- func ShortKey(list Map, min int, arg ...Any) string
- func Simple(val ...Any) []string
- func SimpleKV(key string, arg ...Any) (res []string)
- func Slice(list []string, index ...int) []string
- func SliceRemove(list []string, key string) ([]string, int)
- func Sort(list []string, cb ...func(a, b string) bool) []string
- func SortedKey(obj Any) (res []string)
- func SortedValue(obj Any) (res []string)
- func Split(str string, arg ...string) (res []string)
- func SplitKV(inner, outer string, text string, cb func(text string, ls []string))
- func SplitLine(text string) []string
- func SplitWord(text string) []string
- func Time(arg ...string) int64
- func TransArg(arg []string, key string, trans Any) []string
- func TrimExt(str string, ext ...string) string
- func TrimPath(p string) string
- func UserName() string
- func Width(str string, mul int) int
- func WriteFile(p string, value interface{}) string
- type Any
- type Map
- type Maps
Constants ¶
View Source
const ( // 结构 MDB_DICT = "dict" MDB_META = "meta" MDB_HASH = "hash" MDB_LIST = "list" MDB_UNIQ = "uniq" MDB_FOREACH = "*" MDB_RANDOMS = "%" // 存储 MDB_SHORT = "short" MDB_FIELD = "field" MDB_TOTAL = "total" MDB_COUNT = "count" MDB_LIMIT = "limit" MDB_LEAST = "least" MDB_STORE = "store" MDB_FSIZE = "fsize" // 索引 MDB_INDEX = "index" MDB_VALUE = "value" MDB_EXTRA = "extra" MDB_ALIAS = "alias" MDB_EXPIRE = "expire" MDB_STATUS = "status" MDB_STREAM = "stream" // 文件 MDB_LINK = "link" MDB_SCAN = "scan" MDB_SHOW = "show" MDB_HELP = "help" MDB_DATA = "data" MDB_PATH = "path" MDB_FILE = "file" MDB_LINE = "line" MDB_SIZE = "size" MDB_COST = "cost" // 数据 MDB_TEXT = "text" MDB_NAME = "name" MDB_TYPE = "type" MDB_ZONE = "zone" MDB_TIME = "time" MDB_KEY = "key" MDB_ID = "id" )
Variables ¶
This section is empty.
Functions ¶
func BeginEnd ¶ added in v0.7.1
func BeginEnd(begin, end func()) func()
func CSV ¶
func Close ¶ added in v0.5.0
func Close(p interface{})
func Reflect ¶ added in v0.5.7
func SplitKV ¶ added in v0.7.1
Types ¶
type Any ¶ added in v0.6.4
type Any = interface{}
type Map ¶ added in v0.6.4
Click to show internal directories.
Click to hide internal directories.