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/setting/directory.go | |
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/setting/directory.go')
-rw-r--r-- | modules/setting/directory.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/setting/directory.go b/modules/setting/directory.go index 5dcdd89c04..2641510286 100644 --- a/modules/setting/directory.go +++ b/modules/setting/directory.go @@ -23,13 +23,13 @@ func PrepareAppDataPath() error { if os.IsNotExist(err) { err = os.MkdirAll(AppDataPath, os.ModePerm) if err != nil { - return fmt.Errorf("unable to create the APP_DATA_PATH directory: %q, Error: %v", AppDataPath, err) + return fmt.Errorf("unable to create the APP_DATA_PATH directory: %q, Error: %w", AppDataPath, err) } return nil } if err != nil { - return fmt.Errorf("unable to use APP_DATA_PATH %q. Error: %v", AppDataPath, err) + return fmt.Errorf("unable to use APP_DATA_PATH %q. Error: %w", AppDataPath, err) } if !st.IsDir() /* also works for symlink */ { |