This commit is contained in:
silverwind
2026-02-24 08:17:17 +01:00
parent 4fdf9ab904
commit b0ec3fa4fc
34 changed files with 94 additions and 101 deletions

View File

@@ -55,8 +55,7 @@ type WriteFS interface {
OpenAppendable(name string) (WritableFile, error)
}
type readWriteFSImpl struct {
}
type readWriteFSImpl struct{}
func (fwfs readWriteFSImpl) Open(name string) (fs.File, error) {
return os.Open(name)
@@ -74,7 +73,6 @@ func (fwfs readWriteFSImpl) OpenAppendable(name string) (WritableFile, error) {
return nil, err
}
file, err := os.OpenFile(name, os.O_CREATE|os.O_RDWR, 0o644)
if err != nil {
return nil, err
}
@@ -127,7 +125,6 @@ func uploads(router *httprouter.Router, baseDir string, fsys WriteFS) {
}
return fsys.OpenWritable(safePath)
}()
if err != nil {
panic(err)
}