all repos — homestead @ cb0c1a6f85c4577b242228a7310d137bf461b30f

Code for my website

move style hashing to file layer

Alan Pearce
commit

cb0c1a6f85c4577b242228a7310d137bf461b30f

parent

0ee23f01ab6304fba37c1d2b66b16de9792e285c

1 file changed, 3 insertions(+), 2 deletions(-)

changed files
M internal/storage/sqlite/reader.gointernal/storage/sqlite/reader.go
@@ -2,7 +2,6 @@ package sqlite
import ( "database/sql" - "io" "strings" "time"
@@ -31,6 +30,7 @@ SELECT
file.content_type, file.last_modified, file.etag, + file.style_hash, content.encoding, content.body FROM url
@@ -61,7 +61,7 @@ }
func (r *Reader) GetFile(filename string) (*storage.File, error) { file := &storage.File{ - Encodings: make(map[string]io.ReadSeeker, 1), + Encodings: make(map[string]*buffer.Buffer, 1), } var unixTime int64 var encoding string
@@ -80,6 +80,7 @@ err = rows.Scan(
&file.ContentType, &unixTime, &file.Etag, + &file.StyleHash, &encoding, &content, )