mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-10-29 20:42:25 -05:00
[chore] update dependencies (#4423)
- codeberg.org/gruf/go-ffmpreg: v0.6.10 -> v0.6.11 - github.com/spf13/cast: v1.9.2 -> v1.10.0 - github.com/spf13/viper: v1.20.1 -> v1.21.0 - golang.org/x/crypto: v0.41.0 -> v0.42.0 - golang.org/x/image: v0.30.0 -> v0.31.0 Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4423 Co-authored-by: kim <grufwub@gmail.com> Co-committed-by: kim <grufwub@gmail.com>
This commit is contained in:
parent
a6429b5410
commit
c949b9f2d1
97 changed files with 14611 additions and 3494 deletions
22
vendor/github.com/spf13/afero/mem/file.go
generated
vendored
22
vendor/github.com/spf13/afero/mem/file.go
generated
vendored
|
|
@ -150,7 +150,11 @@ func (f *File) Sync() error {
|
|||
|
||||
func (f *File) Readdir(count int) (res []os.FileInfo, err error) {
|
||||
if !f.fileData.dir {
|
||||
return nil, &os.PathError{Op: "readdir", Path: f.fileData.name, Err: errors.New("not a dir")}
|
||||
return nil, &os.PathError{
|
||||
Op: "readdir",
|
||||
Path: f.fileData.name,
|
||||
Err: errors.New("not a dir"),
|
||||
}
|
||||
}
|
||||
var outLength int64
|
||||
|
||||
|
|
@ -236,7 +240,11 @@ func (f *File) Truncate(size int64) error {
|
|||
return ErrFileClosed
|
||||
}
|
||||
if f.readOnly {
|
||||
return &os.PathError{Op: "truncate", Path: f.fileData.name, Err: errors.New("file handle is read only")}
|
||||
return &os.PathError{
|
||||
Op: "truncate",
|
||||
Path: f.fileData.name,
|
||||
Err: errors.New("file handle is read only"),
|
||||
}
|
||||
}
|
||||
if size < 0 {
|
||||
return ErrOutOfRange
|
||||
|
|
@ -273,7 +281,11 @@ func (f *File) Write(b []byte) (n int, err error) {
|
|||
return 0, ErrFileClosed
|
||||
}
|
||||
if f.readOnly {
|
||||
return 0, &os.PathError{Op: "write", Path: f.fileData.name, Err: errors.New("file handle is read only")}
|
||||
return 0, &os.PathError{
|
||||
Op: "write",
|
||||
Path: f.fileData.name,
|
||||
Err: errors.New("file handle is read only"),
|
||||
}
|
||||
}
|
||||
n = len(b)
|
||||
cur := atomic.LoadInt64(&f.at)
|
||||
|
|
@ -285,7 +297,9 @@ func (f *File) Write(b []byte) (n int, err error) {
|
|||
tail = f.fileData.data[n+int(cur):]
|
||||
}
|
||||
if diff > 0 {
|
||||
f.fileData.data = append(f.fileData.data, append(bytes.Repeat([]byte{0o0}, int(diff)), b...)...)
|
||||
f.fileData.data = append(
|
||||
f.fileData.data,
|
||||
append(bytes.Repeat([]byte{0o0}, int(diff)), b...)...)
|
||||
f.fileData.data = append(f.fileData.data, tail...)
|
||||
} else {
|
||||
f.fileData.data = append(f.fileData.data[:cur], b...)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue