Fix gosimple issues (#17179)
Signed-off-by: Mario Trangoni <mjtrangoni@gmail.com>
This commit is contained in:
committed by
Carl Bergquist
parent
7e3ac4ebde
commit
66ba2aa524
@@ -64,7 +64,7 @@ func newError(message string, err error) *Error {
|
||||
|
||||
// Error returns a Error error string
|
||||
func (err *Error) Error() string {
|
||||
return fmt.Sprintf("%s", err.Message)
|
||||
return err.Message
|
||||
}
|
||||
|
||||
// Options for the AuthProxy
|
||||
@@ -98,20 +98,12 @@ func New(options *Options) *AuthProxy {
|
||||
func (auth *AuthProxy) IsEnabled() bool {
|
||||
|
||||
// Bail if the setting is not enabled
|
||||
if !auth.enabled {
|
||||
return false
|
||||
}
|
||||
|
||||
return true
|
||||
return auth.enabled
|
||||
}
|
||||
|
||||
// HasHeader checks if the we have specified header
|
||||
func (auth *AuthProxy) HasHeader() bool {
|
||||
if len(auth.header) == 0 {
|
||||
return false
|
||||
}
|
||||
|
||||
return true
|
||||
return len(auth.header) != 0
|
||||
}
|
||||
|
||||
// IsAllowedIP compares presented IP with the whitelist one
|
||||
|
||||
Reference in New Issue
Block a user