kit

package module
v0.1.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 24, 2020 License: MIT Imports: 16 Imported by: 0

README

toolkits

golang toolkit

Documentation

Index

Constants

View Source
const (
	MIME_FILE = "application/octet-stream"
	MIME_JSON = "application/json"
	MIME_TEXT = "text/plain"
	MIME_HTML = "text/html"

	MIME_TABLE = "table"
	MIME_ORDER = "order"
	MIME_CHAIN = "chain"
	MIME_TITLE = "title"
	MIME_SHELL = "shell"

	MIME_SPACE = "space"
	MIME_STORY = "story"
	MIME_FAVOR = "favor"
	MIME_SHARE = "share"

	MIME_MASTER = "master"
	MIME_MYSELF = "myself"
	MIME_SERVER = "server"
	MIME_WORKER = "worker"
)
View Source
const (
	MDB_SHORT = "short"

	MDB_DICT = "dict"
	MDB_META = "meta"
	MDB_LIST = "list"
	MDB_HASH = "hash"

	MDB_STATUS = "status"
	MDB_EXTRA  = "extra"
	MDB_VALUE  = "value"
	MDB_USER   = "user"

	MDB_SIZE = "size"
	MDB_FILE = "file"
	MDB_TEXT = "text"
	MDB_NAME = "name"
	MDB_TYPE = "type"
	MDB_TIME = "time"
	MDB_KEY  = "key"
	MDB_ID   = "id"

	MDB_INPUT = "_input"
)

Variables

This section is empty.

Functions

func Create

func Create(p string) (*os.File, string, error)

func Data

func Data(arg ...interface{}) map[string]interface{}

func Dict

func Dict(arg ...interface{}) map[string]interface{}

func Duration

func Duration(str interface{}) time.Duration

func Fetch

func Fetch(val interface{}, cbs interface{}) interface{}

func FmtSize

func FmtSize(size int64) string

func FmtTime

func FmtTime(t int64) string

func Format

func Format(val interface{}, arg ...interface{}) string

func Formats

func Formats(val interface{}) string

func Hash

func Hash(arg ...interface{}) (string, []string)

func Hashs

func Hashs(arg ...interface{}) string

func IndexOf

func IndexOf(str []string, sub string) int

func Int

func Int(val interface{}) int

func Int64

func Int64(val interface{}) int64

func KeyValue

func KeyValue(res map[string]interface{}, key string, arg interface{}) map[string]interface{}

func Keys

func Keys(arg ...interface{}) string

func List

func List(arg ...interface{}) []interface{}

func MergeURL

func MergeURL(str string, arg ...interface{}) string

func MergeURL2

func MergeURL2(str string, uri string, arg ...interface{}) string

func Parse

func Parse(value interface{}, key string, val ...string) interface{}

func Path added in v0.1.1

func Path(str string, rest ...string) string

func Render

func Render(str string, arg interface{}) (b []byte, e error)

func Revert

func Revert(str []string) []string
func Right(str string) bool

func Select

func Select(def string, arg ...interface{}) string

func Short

func Short(arg interface{}) interface{}

func ShortKey

func ShortKey(list map[string]interface{}, min int, arg ...interface{}) string

func Simple

func Simple(val ...interface{}) []string

func Split

func Split(str string, arg ...string) (res []string)

func Time

func Time(arg ...string) int

func UnMarshal

func UnMarshal(data string) interface{}

func Value

func Value(root interface{}, args ...interface{}) interface{}

func Width

func Width(str string, mul int) int

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL