3 Star 0 Fork 0

Aberic / swarm

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
response.go 330 Bytes
一键复制 编辑 原始数据 按行查看 历史
Aberic 提交于 2020-05-25 14:03 . swarm init
package router
import (
"github.com/aberic/gnomon/grope"
"net/http"
)
const (
CodeSuccess = iota
CodeFail
)
type response struct {
Code int
ErrMsg string
Data interface{}
}
func responseFailJSON(ctx *grope.Context, err error) {
_ = ctx.ResponseJSON(http.StatusOK, &response{Code: CodeFail, ErrMsg: err.Error()})
}
Go
1
https://gitee.com/aberic/swarm.git
git@gitee.com:aberic/swarm.git
aberic
swarm
swarm
502bd87b5165

搜索帮助