golint: fix variable name

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
This commit is contained in:
Steven Allen 2018-01-11 14:01:48 -08:00 committed by Jeromy
parent 6bf29205bc
commit 9080a588d8
2 changed files with 3 additions and 3 deletions

View File

@ -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
}
}

View File

@ -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