Open mattes opened 5 years ago
So, writing to the file would completely overwrite? Or would it append?
I'm not sure if this is something rice should do itself; or if it would be something for a layer in between http.FileServer
and box.HTTPBox()
.
It would probably be cleaner to implement a separate package that provides a http.FileSystem by wrapping an existing http.FileSystem (e.g. box.HTTPBox()
), but allows for modifications/overwrites. It first checks its local changeset, if there's no matching file, then forwards the Open(..) call to the wrapped http.FileSystem.
Probably interesting to look at for this: https://github.com/spf13/afero
It would be nice if
type File
would implementio.Writer
. That way I could update some static files on the fly when served viahttp.FileServer(box.HTTPBox())
.