move style hashing to file layer
1 file changed, 3 insertions(+), 2 deletions(-)
changed files
M internal/storage/sqlite/reader.go → internal/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, )