package
Version:
v0.0.0-...-1585808
Opens a new window with list of versions in this module.
Published: Feb 15, 2025
License: MIT
Opens a new window with license information.
Imports: 3
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
WriteResponse 将错误或响应数据写入 HTTP 响应主体。
WriteResponse 使用 errno.Decode 方法,根据错误类型,尝试从 err 中提取业务错误码和错误信息.
type ErrResponse struct {
Code string `json:"code"`
Message string `json:"message"`
}
ErrResponse 定义了发生错误时的返回消息.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.