【文件属性】:
文件名称:gores:处理HTML,JSON,XML等响应的Go包
文件大小:8KB
文件格式:ZIP
更新时间:2021-02-05 15:29:29
go golang json-api rest-api restful
戈尔斯
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
【文件预览】:
gores-master
----go.mod(42B)
----.travis.yml(127B)
----LICENSE(11KB)
----README.md(2KB)
----gores.go(6KB)
----.gitignore(41B)
----gores_test.go(3KB)