forked from TrueCloudLab/distribution
Unexported function to comply with golint
Signed-off-by: Dave Trombley <dave.trombley@gmail.com>
This commit is contained in:
parent
fe9ca88946
commit
3504445680
2 changed files with 2 additions and 2 deletions
|
@ -44,7 +44,7 @@ func newAccessController(options map[string]interface{}) (auth.AccessController,
|
||||||
return nil, fmt.Errorf(`"path" must be set for basic access controller`)
|
return nil, fmt.Errorf(`"path" must be set for basic access controller`)
|
||||||
}
|
}
|
||||||
|
|
||||||
return &accessController{realm: realm.(string), htpasswd: NewHTPasswd(path.(string))}, nil
|
return &accessController{realm: realm.(string), htpasswd: newHTPasswd(path.(string))}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (ac *accessController) Authorized(ctx context.Context, accessRecords ...auth.Access) (context.Context, error) {
|
func (ac *accessController) Authorized(ctx context.Context, accessRecords ...auth.Access) (context.Context, error) {
|
||||||
|
|
|
@ -55,7 +55,7 @@ func (at AuthType) String() string {
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewHTPasswd Create a new HTPasswd with the given path to .htpasswd file.
|
// NewHTPasswd Create a new HTPasswd with the given path to .htpasswd file.
|
||||||
func NewHTPasswd(htpath string) *htpasswd {
|
func newHTPasswd(htpath string) *htpasswd {
|
||||||
return &htpasswd{path: htpath}
|
return &htpasswd{path: htpath}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue