Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option func(*Response)
Option 定义配置选项函数(关键)
func D ¶
func D(data interface{}) Option
D 设置响应参数 @param interface{} data 响应数据 @return Option 返回配置选项函数
type Request ¶
Request 请求结构体
func (*Request) Json ¶
func (r *Request) Json(data interface{}, args ...interface{})
Json 方法二:响应函数(所有字段转小驼峰写法) @param interface{} data 接收响应参数 @param args 第一个参数为message,第二个参数为code
Click to show internal directories.
Click to hide internal directories.