go fmt
This commit is contained in:
@ -2,11 +2,11 @@ package pages
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"html/template"
|
||||
"net/http"
|
||||
"git.binarythought.com/cdramey/qurl/obj"
|
||||
"git.binarythought.com/cdramey/qurl/static"
|
||||
"git.binarythought.com/cdramey/qurl/storage"
|
||||
"git.binarythought.com/cdramey/qurl/obj"
|
||||
"html/template"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
type RootHandler struct {
|
||||
|
@ -10,11 +10,11 @@ import (
|
||||
)
|
||||
|
||||
type StaticContent struct {
|
||||
Type string
|
||||
Content []byte
|
||||
ETag string
|
||||
Type string
|
||||
Content []byte
|
||||
ETag string
|
||||
GZIPContent []byte
|
||||
GZIPETag string
|
||||
GZIPETag string
|
||||
}
|
||||
|
||||
func (sc *StaticContent) Init() {
|
||||
@ -40,7 +40,7 @@ func (sc *StaticContent) Init() {
|
||||
|
||||
// Using gzip encoding adds a minimum of 24 characters to the HTTP
|
||||
// header, so only accept gzip encoding if we save that much or more
|
||||
if (buf.Len()+24) < len(sc.Content) {
|
||||
if (buf.Len() + 24) < len(sc.Content) {
|
||||
sc.GZIPContent = buf.Bytes()
|
||||
sc.GZIPETag = fmt.Sprintf("%x", md5.Sum(sc.GZIPContent))
|
||||
}
|
||||
|
Reference in New Issue
Block a user