Use bytes.Reader instead of bytes.Buffer for compiled in assets

This commit is contained in:
Jakob Borg 2015-01-13 16:05:03 +01:00
parent fbb3222d29
commit b4043216b6
2 changed files with 55 additions and 55 deletions

View File

@ -45,7 +45,7 @@ func Assets() map[string][]byte {
var gr *gzip.Reader
{{range $asset := .assets}}
bs, _ = base64.StdEncoding.DecodeString("{{$asset.Data}}")
gr, _ = gzip.NewReader(bytes.NewBuffer(bs))
gr, _ = gzip.NewReader(bytes.NewReader(bs))
bs, _ = ioutil.ReadAll(gr)
assets["{{$asset.Name}}"] = bs
{{end}}

File diff suppressed because one or more lines are too long