From 9080a588d81f0759f225f65d71efdfb6178e1d41 Mon Sep 17 00:00:00 2001 From: Steven Allen <steven@stebalien.com> Date: Thu, 11 Jan 2018 14:01:48 -0800 Subject: [PATCH] golint: fix variable name License: MIT Signed-off-by: Steven Allen <steven@stebalien.com> --- core/corehttp/commands.go | 4 ++-- core/corehttp/option_test.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/core/corehttp/commands.go b/core/corehttp/commands.go index b299a437d..5ab953ecb 100644 --- a/core/corehttp/commands.go +++ b/core/corehttp/commands.go @@ -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 } } diff --git a/core/corehttp/option_test.go b/core/corehttp/option_test.go index b32e2afcf..c600a0603 100644 --- a/core/corehttp/option_test.go +++ b/core/corehttp/option_test.go @@ -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 -- GitLab