diff options
author | delvh <leon@kske.dev> | 2022-10-24 21:29:17 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-24 21:29:17 +0200 |
commit | 0ebb45cfe7606adf021ad359d6fbfcefc54360a5 (patch) | |
tree | 541b75d083213e93bbbfadbdc5d560c739543903 /modules/options | |
parent | Fix package access for admins and inactive users (#21580) (diff) | |
download | forgejo-0ebb45cfe7606adf021ad359d6fbfcefc54360a5.tar.xz forgejo-0ebb45cfe7606adf021ad359d6fbfcefc54360a5.zip |
Replace all instances of fmt.Errorf(%v) with fmt.Errorf(%w) (#21551)
Found using
`find . -type f -name '*.go' -print -exec vim {} -c
':%s/fmt\.Errorf(\(.*\)%v\(.*\)err/fmt.Errorf(\1%w\2err/g' -c ':wq' \;`
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Diffstat (limited to 'modules/options')
-rw-r--r-- | modules/options/dynamic.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/modules/options/dynamic.go b/modules/options/dynamic.go index eeef11e8da..3739867580 100644 --- a/modules/options/dynamic.go +++ b/modules/options/dynamic.go @@ -32,12 +32,12 @@ func Dir(name string) ([]string, error) { isDir, err := util.IsDir(customDir) if err != nil { - return []string{}, fmt.Errorf("Unabe to check if custom directory %s is a directory. %v", customDir, err) + return []string{}, fmt.Errorf("Unabe to check if custom directory %s is a directory. %w", customDir, err) } if isDir { files, err := util.StatDir(customDir, true) if err != nil { - return []string{}, fmt.Errorf("Failed to read custom directory. %v", err) + return []string{}, fmt.Errorf("Failed to read custom directory. %w", err) } result = append(result, files...) @@ -47,12 +47,12 @@ func Dir(name string) ([]string, error) { isDir, err = util.IsDir(staticDir) if err != nil { - return []string{}, fmt.Errorf("unable to check if static directory %s is a directory. %v", staticDir, err) + return []string{}, fmt.Errorf("unable to check if static directory %s is a directory. %w", staticDir, err) } if isDir { files, err := util.StatDir(staticDir, true) if err != nil { - return []string{}, fmt.Errorf("Failed to read static directory. %v", err) + return []string{}, fmt.Errorf("Failed to read static directory. %w", err) } result = append(result, files...) |