mirror of
https://github.com/octoleo/syncthing.git
synced 2025-01-22 22:58:25 +00:00
Use bytes.Reader instead of bytes.Buffer for compiled in assets
This commit is contained in:
parent
fbb3222d29
commit
b4043216b6
@ -45,7 +45,7 @@ func Assets() map[string][]byte {
|
|||||||
var gr *gzip.Reader
|
var gr *gzip.Reader
|
||||||
{{range $asset := .assets}}
|
{{range $asset := .assets}}
|
||||||
bs, _ = base64.StdEncoding.DecodeString("{{$asset.Data}}")
|
bs, _ = base64.StdEncoding.DecodeString("{{$asset.Data}}")
|
||||||
gr, _ = gzip.NewReader(bytes.NewBuffer(bs))
|
gr, _ = gzip.NewReader(bytes.NewReader(bs))
|
||||||
bs, _ = ioutil.ReadAll(gr)
|
bs, _ = ioutil.ReadAll(gr)
|
||||||
assets["{{$asset.Name}}"] = bs
|
assets["{{$asset.Name}}"] = bs
|
||||||
{{end}}
|
{{end}}
|
||||||
|
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user