Skip to content

Commit

Permalink
osfs: fix returned error
Browse files Browse the repository at this point in the history
Signed-off-by: matewolf <[email protected]>
  • Loading branch information
matewolf committed Aug 29, 2023
1 parent fcbb894 commit d1288c8
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions internal/filesystem/osfs.go
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
package filesystem

import (
"fmt"
"os"
)

type OsFs struct{}

func (fs *OsFs) Stat(name string) (os.FileInfo, error) {
fileInfo, err := os.Stat(name)
return fileInfo, fmt.Errorf("os.Stat: %w", err)
return fileInfo, err //nolint:wrapcheck
}

func (fs *OsFs) Getwd() (string, error) {
currentWd, err := os.Getwd()
return currentWd, fmt.Errorf("os.Getwd: %w", err)
return currentWd, err //nolint:wrapcheck
}

0 comments on commit d1288c8

Please sign in to comment.