【文件属性】:
文件名称:sloth:Go 中的 RESTful Web API
文件大小:7KB
文件格式:ZIP
更新时间:2021-06-08 16:13:28
Go
树懒
RESTful Web API 库,支持 Go 中的 Resthooks
基于: :
设置
cd YOUR_SLOTH_DIR
export GOPATH= $( pwd )
例子
package main
import (
"fmt"
"sloth"
"net/url"
)
// Basic text resource
type FooText struct {
sloth. RestResource
}
func ( FooText ) Get ( values url. Values ) ( int , interface {}) {
return 200 , "hello world!"
}
func ( FooText ) Post ( values url. Values ) ( int , interface {}) {
return
【文件预览】:
sloth-master
----main.go(1KB)
----src()
--------sloth()
----LICENSE(1KB)
----README.md(2KB)
----.gitignore(266B)