Skip to content

Latest commit

 

History

History
124 lines (91 loc) · 3.22 KB

README.EN.md

File metadata and controls

124 lines (91 loc) · 3.22 KB

English | 简体中文

GitHub tag (latest SemVer) flat go.dev reference UnitTest Go Report Card codecov

luckything

Golang daily development common function library

Documentation

Check out the documentation

Recommended to use with the zzz watch command of zzz

Why Zara

Simple and easy to use, lightweight enough to avoid excessive external dependencies, minimum compatible with old systems such as Window 7.

QuickStart

Install

$ go get github.com/sohaha/zlsgo

HTTP Service

// 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()
}

znet

Logger

package main

import (
    "github.com/sohaha/zlsgo/zlog"
)

func main(){
    zlog.Debug("This is a debug")
    zlog.Error("This is a error")
    // zlog...
}

zlog

HTTP Client

// 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)

}

More features

Please read the documentation https://docs.73zls.com/zls-go/#

Todo

  • 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)

LICENSE

MIT