Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ linters:
#- prealloc # [premature optimization, but can be used in some cases] finds slice declarations that could potentially be preallocated
#- tagalign # checks that struct tags are well aligned
#- varnamelen # [great idea, but too many false positives] checks that the length of a variable's name matches its scope
#- wrapcheck # checks that errors returned from external packages are wrapped
- wrapcheck # checks that errors returned from external packages are wrapped
#- zerologlint # detects the wrong usage of zerolog that a user forgets to dispatch zerolog.Event

## disabled
Expand Down
6 changes: 3 additions & 3 deletions internal/cache/disk.go
Original file line number Diff line number Diff line change
Expand Up @@ -267,15 +267,15 @@ func (d *Disk) evict() error {

err := filepath.Walk(d.config.Root, func(path string, info fs.FileInfo, err error) error {
if err != nil {
return err
return errors.WithStack(err)
}
if info.IsDir() {
return nil
}

relPath, err := filepath.Rel(d.config.Root, path)
if err != nil {
return err
return errors.WithStack(err)
}

expiresAtBytes, err := xattr.Get(path, expiresAtXAttr)
Expand Down Expand Up @@ -353,7 +353,7 @@ type diskWriter struct {
func (w *diskWriter) Write(p []byte) (int, error) {
n, err := w.file.Write(p)
w.size += int64(n)
return n, err
return n, errors.WithStack(err)
}

func (w *diskWriter) Close() error {
Expand Down