all repos — homestead @ cb0c1a6f85c4577b242228a7310d137bf461b30f

Code for my website

move style hashing to file layer

Alan Pearce
commit

cb0c1a6f85c4577b242228a7310d137bf461b30f

parent

0ee23f01ab6304fba37c1d2b66b16de9792e285c

1 file changed, 5 insertions(+), 0 deletions(-)

changed files
M internal/storage/files/writer.gointernal/storage/files/writer.go
@@ -9,6 +9,7 @@
"go.alanpearce.eu/homestead/internal/buffer" "go.alanpearce.eu/homestead/internal/content" "go.alanpearce.eu/homestead/internal/multifile" + "go.alanpearce.eu/homestead/internal/storage" "go.alanpearce.eu/x/log" "github.com/andybalholm/brotli"
@@ -77,6 +78,10 @@ }
fd.Close() return nil +} + +func (f *Files) WriteFile(file *storage.File, content *buffer.Buffer) error { + return f.Write(file.Path, content) } func (f *Files) write(pathname string, content *buffer.Buffer) (multifile.FileLike, error) {