package
Version:
v0.1.1
Opens a new window with list of versions in this module.
Published: Feb 25, 2019
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
¶
result 包含了对微信接口所有错误返回信息的定义
type Result struct {
Code int `json:"errcode,omitempty"`
Message string `json:"errmsg,omitempty"`
}
Result 描述了微信和 http 状态码,其中
[0,400) 区间的为非错误代码;
[400,600) 之间的为 HTTP 错误代码;
[600,40000) 之间的自定义的错误代码;
[40000,) 为微信的错误代码
NOTE: 当将 Result 当作一个 error 时,请确保 Result.IsOK() 为 false。
From 将一段字符串转换成 Result 实例。
Error 实现 error 接口内容,在 IsOK 为 false 时,可以将 Result 当作一个 error 实例来使用。
Source Files
¶
Click to show internal directories.
Click to hide internal directories.