mirror of
https://github.com/ipfs/kubo.git
synced 2026-03-06 08:47:52 +08:00
golint: fix variable name
License: MIT Signed-off-by: Steven Allen <steven@stebalien.com>
This commit is contained in:
parent
6bf29205bc
commit
9080a588d8
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user