Skip to content

Commit b8b714b

Browse files
committed
fix lint
1 parent 9183a07 commit b8b714b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

internal/config/types.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -348,8 +348,8 @@ func (nr *NginxReceiver) Validate(allowedDirectories []string) error {
348348
}
349349

350350
for _, al := range nr.AccessLogs {
351-
allowed, err := isAllowedDir(al.FilePath, allowedDirectories)
352-
if err != nil {
351+
allowed, allowedError := isAllowedDir(al.FilePath, allowedDirectories)
352+
if allowedError != nil {
353353
err = errors.Join(err, fmt.Errorf("invalid nginx receiver access log path: %s", al.FilePath))
354354
}
355355
if !allowed {
@@ -372,6 +372,7 @@ func (c *Config) IsDirectoryAllowed(directory string) bool {
372372
slog.Warn("Unable to determine if directory is allowed", "error", err)
373373
return false
374374
}
375+
375376
return allow
376377
}
377378

0 commit comments

Comments
 (0)