myxd-gokit

module
v0.1.1 Latest Latest
Warning

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

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

README

myxd-gokit

golang foundations framework 收集的基类与框架

Directories

Path Synopsis
Package buffer contains buffer and wrapper types for byte slices.
Package buffer contains buffer and wrapper types for byte slices.
redis
Package redis for cache provider depend on github.com/gomodule/redigo/redis go install github.com/gomodule/redigo/redis ) bm, err := cache.NewCache("redis", `{"conn":"127.0.0.1:11211"}`)
Package redis for cache provider depend on github.com/gomodule/redigo/redis go install github.com/gomodule/redigo/redis ) bm, err := cache.NewCache("redis", `{"conn":"127.0.0.1:11211"}`)
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 ( "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) } }
Package validation for validations import ( "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) } }
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