Fix gosimple issues (#17179)

Signed-off-by: Mario Trangoni <mjtrangoni@gmail.com>
This commit is contained in:
Mario Trangoni
2019-05-21 07:50:44 +02:00
committed by Carl Bergquist
parent 7e3ac4ebde
commit 66ba2aa524
5 changed files with 7 additions and 14 deletions
+3 -11
View File
@@ -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