diff options
author | 2023-06-05 10:15:05 +0200 | |
---|---|---|
committer | 2023-06-05 10:15:05 +0200 | |
commit | b401bd1ccbce7fa547c75e9f0ae89e211112c1bb (patch) | |
tree | 08bf9ed438713e8c390ea60732e7dfc14b0d3191 /vendor/github.com/spf13/afero/util.go | |
parent | [chore]: Bump github.com/minio/minio-go/v7 from 7.0.55 to 7.0.56 (#1869) (diff) | |
download | gotosocial-b401bd1ccbce7fa547c75e9f0ae89e211112c1bb.tar.xz |
[chore] update latest deps, ensure readme up to date (#1873)
* [chore] update latest deps, ensure readme up to date
* remove double entry
Diffstat (limited to 'vendor/github.com/spf13/afero/util.go')
-rw-r--r-- | vendor/github.com/spf13/afero/util.go | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/vendor/github.com/spf13/afero/util.go b/vendor/github.com/spf13/afero/util.go index cb7de23f2..9e4cba274 100644 --- a/vendor/github.com/spf13/afero/util.go +++ b/vendor/github.com/spf13/afero/util.go @@ -43,7 +43,7 @@ func WriteReader(fs Fs, path string, r io.Reader) (err error) { ospath := filepath.FromSlash(dir) if ospath != "" { - err = fs.MkdirAll(ospath, 0777) // rwx, rw, r + err = fs.MkdirAll(ospath, 0o777) // rwx, rw, r if err != nil { if err != os.ErrExist { return err @@ -71,7 +71,7 @@ func SafeWriteReader(fs Fs, path string, r io.Reader) (err error) { ospath := filepath.FromSlash(dir) if ospath != "" { - err = fs.MkdirAll(ospath, 0777) // rwx, rw, r + err = fs.MkdirAll(ospath, 0o777) // rwx, rw, r if err != nil { return } @@ -124,7 +124,7 @@ func GetTempDir(fs Fs, subPath string) string { return addSlash(dir) } - err := fs.MkdirAll(dir, 0777) + err := fs.MkdirAll(dir, 0o777) if err != nil { panic(err) } @@ -197,7 +197,6 @@ func FileContainsAnyBytes(fs Fs, filename string, subslices [][]byte) (bool, err // readerContains reports whether any of the subslices is within r. func readerContainsAny(r io.Reader, subslices ...[]byte) bool { - if r == nil || len(subslices) == 0 { return false } |