Merge aa3d99c2fb69dbd920ad8425014c0d8f3c8fa302 into b57163a0e4339d7feb393ff430a454f4e448cf9c

This commit is contained in:
2022-07-13 11:21:50 +00:00 committed by GitHub
commit 04187571b7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 4 deletions

View File

@ -39,7 +39,7 @@ func (a authPairs) searchCredential(authValue string) (string, bool) {
} }
// BasicAuthForRealm returns a Basic HTTP Authorization middleware. It takes as arguments a map[string]string where // BasicAuthForRealm returns a Basic HTTP Authorization middleware. It takes as arguments a map[string]string where
// the key is the user name and the value is the password, as well as the name of the Realm. // the key is the username and the value is the password, as well as the name of the Realm.
// If the realm is empty, "Authorization Required" will be used by default. // If the realm is empty, "Authorization Required" will be used by default.
// (see http://tools.ietf.org/html/rfc2617#section-1.2) // (see http://tools.ietf.org/html/rfc2617#section-1.2)
func BasicAuthForRealm(accounts Accounts, realm string) HandlerFunc { func BasicAuthForRealm(accounts Accounts, realm string) HandlerFunc {
@ -65,7 +65,7 @@ func BasicAuthForRealm(accounts Accounts, realm string) HandlerFunc {
} }
// BasicAuth returns a Basic HTTP Authorization middleware. It takes as argument a map[string]string where // BasicAuth returns a Basic HTTP Authorization middleware. It takes as argument a map[string]string where
// the key is the user name and the value is the password. // the key is the username and the value is the password.
func BasicAuth(accounts Accounts) HandlerFunc { func BasicAuth(accounts Accounts) HandlerFunc {
return BasicAuthForRealm(accounts, "") return BasicAuthForRealm(accounts, "")
} }

View File

@ -35,7 +35,7 @@ func TestError(t *testing.T) {
jsonBytes, _ := json.Marshal(err) jsonBytes, _ := json.Marshal(err)
assert.Equal(t, "{\"error\":\"test error\",\"meta\":\"some data\"}", string(jsonBytes)) assert.Equal(t, "{\"error\":\"test error\",\"meta\":\"some data\"}", string(jsonBytes))
err.SetMeta(H{ // nolint: errcheck err.SetMeta(H{ // nolint: err check
"status": "200", "status": "200",
"data": "some data", "data": "some data",
}) })

View File

@ -813,7 +813,7 @@ walk: // Outer loop for walking the tree
end++ end++
} }
// Add param value to case insensitive path // Add param value to case-insensitive path
ciPath = append(ciPath, path[:end]...) ciPath = append(ciPath, path[:end]...)
// We need to go deeper! // We need to go deeper!