style: fix revive linter warnings
- Mark unused stub parameters with underscore - Rename 'copy' variable to avoid shadowing builtin - Remove unnecessary else blocks after return statements
This commit is contained in:
parent
1fb4a2c2c6
commit
67b60adb65
3 changed files with 15 additions and 16 deletions
|
|
@ -8,6 +8,6 @@ import (
|
|||
)
|
||||
|
||||
// runAsWindowsService is a no-op on non-Windows platforms
|
||||
func runAsWindowsService(cfg hostagent.Config, logger zerolog.Logger) error {
|
||||
func runAsWindowsService(_ hostagent.Config, _ zerolog.Logger) error {
|
||||
return nil
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7582,8 +7582,8 @@ func cloneStringPtr(value *string) *string {
|
|||
if value == nil {
|
||||
return nil
|
||||
}
|
||||
copy := *value
|
||||
return ©
|
||||
v := *value
|
||||
return &v
|
||||
}
|
||||
|
||||
func cloneThresholdConfig(cfg ThresholdConfig) ThresholdConfig {
|
||||
|
|
@ -7972,14 +7972,14 @@ func (m *Manager) evaluateFilterStack(guest interface{}, stack FilterStack) bool
|
|||
}
|
||||
}
|
||||
return true
|
||||
} else { // OR
|
||||
for _, result := range results {
|
||||
if result {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
// OR
|
||||
for _, result := range results {
|
||||
if result {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
// getGuestThresholds returns the appropriate thresholds for a guest
|
||||
|
|
|
|||
|
|
@ -290,13 +290,12 @@ func CheckAuth(cfg *config.Config, w http.ResponseWriter, r *http.Request) bool
|
|||
// Use ValidateAndExtendSession for sliding expiration
|
||||
if ValidateAndExtendSession(cookie.Value) {
|
||||
return true
|
||||
} else {
|
||||
// Debug logging for failed session validation
|
||||
log.Debug().
|
||||
Str("session_token", cookie.Value[:8]+"...").
|
||||
Str("path", r.URL.Path).
|
||||
Msg("Session validation failed - token not found or expired")
|
||||
}
|
||||
// Debug logging for failed session validation
|
||||
log.Debug().
|
||||
Str("session_token", cookie.Value[:8]+"...").
|
||||
Str("path", r.URL.Path).
|
||||
Msg("Session validation failed - token not found or expired")
|
||||
} else if err != nil {
|
||||
// Debug logging when no session cookie found
|
||||
log.Debug().
|
||||
|
|
|
|||
Loading…
Reference in a new issue