Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func JSON ¶
func JSON(w http.ResponseWriter, statusCode int, data ...interface{})
JSON 返回json信息,带标准回复
func JSONCustom ¶
func JSONCustom(w http.ResponseWriter, code Code, data ...interface{})
JSONCustom http.StatusBadRequest式应答,自定义code,提供给前端
func JSONDetail ¶
func JSONDetail(w http.ResponseWriter, err error, data ...interface{})
JSONDetail http.StatusBadRequest式应答,含detail字段,用于debug
Types ¶
Click to show internal directories.
Click to hide internal directories.