戈尔斯
Go的http响应实用程序库
该软件包非常小巧,轻巧,对于RESTful API很有用。
安装
go get github.com/alioygur/gores
要求
gores库要求Go版本>=1.7
用法
package main
import (
"log"
"net/http"
"github.com/alioygur/gores"
)
type User struct {
Name string
Email string
Age int
}
func main () {
// Plain text response
http . HandleFunc