run go fmt

This commit is contained in:
john 2020-06-14 10:16:08 +08:00
parent a05220f619
commit 4d8150e363
2 changed files with 7 additions and 10 deletions

View File

@ -21,7 +21,6 @@ type Accounts map[string]string
// authKVMap defines a key/value for Authorization token / user
type authKVMap map[string]string
func (a authKVMap) searchCredential(authValue string) (string, bool) {
if authValue == "" {
return "", false
@ -33,7 +32,6 @@ func (a authKVMap) searchCredential(authValue string) (string, bool) {
return user, true
}
// 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.
// If the realm is empty, "Authorization Required" will be used by default.

View File

@ -20,7 +20,6 @@ func TestBasicAuth(t *testing.T) {
"bar": "foo",
})
assert.Len(t, authMap, 3)
assert.Contains(t, authMap, "Basic YmFyOmZvbw==")
assert.Contains(t, authMap, "Basic Zm9vOmJhcg==")