style: fix remaining golangci-lint findings

This commit is contained in:
2026-11-23 01:21:16 +00:00
parent 1fefe03e8f
commit ea00fac0fe
6 changed files with 50 additions and 10 deletions
+1 -1
View File
@@ -140,7 +140,7 @@ func (s *Storage) Put(ctx context.Context, key string, data io.Reader, opts *sto
s.logger.Warn().Err(err).Str("path", s.path).Msg("nfs: failed to open configured base; skipping fsync")
return nil
}
defer root.Close() // #nosec G307 -- Best-effort cleanup of opened NFS root
defer func() { _ = root.Close() }()
f, err := root.OpenFile(relPath, os.O_RDWR, 0)
if err != nil {
s.logger.Warn().Err(err).Str("key", key).Msg("nfs: post-put open failed; skipping fsync")