myxgo-plusplus

module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2021 License: Apache-2.0

README

myxgo-plusplus

golang foundations framework 收集的基类与框架

Directories

Path Synopsis
Package cache provide a Cache interface and some implement engine Usage: import( "github.com/astaxie/beego/cache" ) bm, err := cache.NewCache("memory", `{"interval":60}`) Use it like this: bm.Put("astaxie", 1, 10 * time.Second) bm.Get("astaxie") bm.IsExist("astaxie") bm.Delete("astaxie") more docs http://beego.me/docs/module/cache.md
Package cache provide a Cache interface and some implement engine Usage: import( "github.com/astaxie/beego/cache" ) bm, err := cache.NewCache("memory", `{"interval":60}`) Use it like this: bm.Put("astaxie", 1, 10 * time.Second) bm.Get("astaxie") bm.IsExist("astaxie") bm.Delete("astaxie") more docs http://beego.me/docs/module/cache.md
memcache
Package memcache for cache provider depend on github.com/bradfitz/gomemcache/memcache go install github.com/bradfitz/gomemcache/memcache Usage: import( _ "github.com/astaxie/beego/cache/memcache" "github.com/astaxie/beego/cache" ) bm, err := cache.NewCache("memcache", `{"conn":"127.0.0.1:11211"}`) more docs http://beego.me/docs/module/cache.md
Package memcache for cache provider depend on github.com/bradfitz/gomemcache/memcache go install github.com/bradfitz/gomemcache/memcache Usage: import( _ "github.com/astaxie/beego/cache/memcache" "github.com/astaxie/beego/cache" ) bm, err := cache.NewCache("memcache", `{"conn":"127.0.0.1:11211"}`) more docs http://beego.me/docs/module/cache.md
redis
Package redis for cache provider depend on github.com/gomodule/redigo/redis go install github.com/gomodule/redigo/redis Usage: import( _ "github.com/astaxie/beego/cache/redis" "github.com/astaxie/beego/cache" ) bm, err := cache.NewCache("redis", `{"conn":"127.0.0.1:11211"}`) more docs http://beego.me/docs/module/cache.md
Package redis for cache provider depend on github.com/gomodule/redigo/redis go install github.com/gomodule/redigo/redis Usage: import( _ "github.com/astaxie/beego/cache/redis" "github.com/astaxie/beego/cache" ) bm, err := cache.NewCache("redis", `{"conn":"127.0.0.1:11211"}`) more docs http://beego.me/docs/module/cache.md
Package check is a rich testing extension for Go's testing package.
Package check is a rich testing extension for Go's testing package.
Package crock32 implements Douglas Crockford's Base32 encoding.
Package crock32 implements Douglas Crockford's Base32 encoding.
Package pretty provides pretty-printing for Go values.
Package pretty provides pretty-printing for Go values.
## htmlgo Type safe and modularize way to generate html on server side.
## htmlgo Type safe and modularize way to generate html on server side.
Package imgext return array of all Image Extensions
Package imgext return array of all Image Extensions
Package ini provides INI img read and write functionality in Go.
Package ini provides INI img read and write functionality in Go.
Package com is an open source project for commonly used functions for the Go programming language.
Package com is an open source project for commonly used functions for the Go programming language.
Example usage: package main import ( "fmt" ) func main() { UUID4 := uuid.UUID4() fmt.Println("UUID4 is", UUID4) UUID5 := uuid.UUID5(uuid.NamespaceDNS, "SomeName") fmt.Println("UUID5", UUID5) }
Example usage: package main import ( "fmt" ) func main() { UUID4 := uuid.UUID4() fmt.Println("UUID4 is", UUID4) UUID5 := uuid.UUID5(uuid.NamespaceDNS, "SomeName") fmt.Println("UUID5", UUID5) }
Package uuidapikey contains generator, validator, and converter that transforms UUIDs into human-readable Base32-Crockford encoded API Keys
Package uuidapikey contains generator, validator, and converter that transforms UUIDs into human-readable Base32-Crockford encoded API Keys
Package validation for validations import ( "github.com/astaxie/beego/validation" "log" ) type User struct { Name string Age int } func main() { u := User{"man", 40} valid := validation.Validation{} valid.Required(u.Name, "name") valid.MaxSize(u.Name, 15, "nameMax") valid.Range(u.Age, 0, 140, "age") if valid.HasErrors() { // validation does not pass // print invalid message for _, err := range valid.Errors { log.Println(err.Key, err.Message) } } // or use like this if v := valid.Max(u.Age, 140, "ageMax"); !v.Ok { log.Println(v.Error.Key, v.Error.Message) } } more info: http://beego.me/docs/mvc/controller/validation.md
Package validation for validations import ( "github.com/astaxie/beego/validation" "log" ) type User struct { Name string Age int } func main() { u := User{"man", 40} valid := validation.Validation{} valid.Required(u.Name, "name") valid.MaxSize(u.Name, 15, "nameMax") valid.Range(u.Age, 0, 140, "age") if valid.HasErrors() { // validation does not pass // print invalid message for _, err := range valid.Errors { log.Println(err.Key, err.Message) } } // or use like this if v := valid.Max(u.Age, 140, "ageMax"); !v.Ok { log.Println(v.Error.Key, v.Error.Message) } } more info: http://beego.me/docs/mvc/controller/validation.md
Package wildmatch used to match strings against a simple wildcard pattern.
Package wildmatch used to match strings against a simple wildcard pattern.
Package yaml implements YAML support for the Go language.
Package yaml implements YAML support for the Go language.

Jump to

Keyboard shortcuts

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