提交 9080a588 作者: Steven Allen 提交者: Jeromy

golint: fix variable name

License: MIT
Signed-off-by: 's avatarSteven Allen <steven@stebalien.com>
上级 6bf29205
......@@ -20,7 +20,7 @@ import (
)
var (
errApiVersionMismatch = errors.New("api version mismatch")
errAPIVersionMismatch = errors.New("api version mismatch")
)
const originEnvKey = "API_ORIGIN"
......@@ -157,7 +157,7 @@ func CheckVersionOption() ServeOption {
clientVersion := r.UserAgent()
// skips check if client is not go-ipfs
if clientVersion != "" && strings.Contains(clientVersion, "/go-ipfs/") && daemonVersion != clientVersion {
http.Error(w, fmt.Sprintf("%s (%s != %s)", errApiVersionMismatch, daemonVersion, clientVersion), http.StatusBadRequest)
http.Error(w, fmt.Sprintf("%s (%s != %s)", errAPIVersionMismatch, daemonVersion, clientVersion), http.StatusBadRequest)
return
}
}
......
......@@ -20,7 +20,7 @@ type testcasecheckversion struct {
func (tc testcasecheckversion) body() string {
if !tc.shouldHandle && tc.responseBody == "" {
return fmt.Sprintf("%s (%s != %s)\n", errApiVersionMismatch, config.ApiVersion, tc.userAgent)
return fmt.Sprintf("%s (%s != %s)\n", errAPIVersionMismatch, config.ApiVersion, tc.userAgent)
}
return tc.responseBody
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论