English | 简体中文
Golang daily development common function library
Recommended to use with the zzz watch
command of zzz
Simple and easy to use, lightweight enough to avoid excessive external dependencies, minimum compatible with old systems such as Window 7.
$ go get github.com/sohaha/zlsgo
// main.go
package main
import (
"github.com/sohaha/zlsgo/znet"
)
func main(){
r := znet.New()
r.GET("/hi", func(c *znet.Context) {
c.String(200, "Hello world")
})
// Implicit routing (struct binding) please refer to the document
znet.Run()
}
package main
import (
"github.com/sohaha/zlsgo/zlog"
)
func main(){
zlog.Debug("This is a debug")
zlog.Error("This is a error")
// zlog...
}
// main.go
package main
import (
"github.com/sohaha/zlsgo/zhttp"
"github.com/sohaha/zlsgo/zlog"
)
func main(){
data, err := zhttp.Get("https://github.com")
if err != nil {
zlog.Error(err)
return
}
res := data.String()
zlog.Debug(res)
}
Please read the documentation https://docs.73zls.com/zls-go/#
- HttpServer
- HttpClient
- JSON RPC
- Logger
- Json processing
- String processing
- Validator
- Hot Restart
- Daemon
- Abnormal report
- Terminal application
- Goroutine pool
- HTML Parse
- Injection
- Server Sent Event
- High-performance HashMap
- Database
- ...(Read more documentation)