summaryrefslogtreecommitdiff
path: root/lib.go
diff options
context:
space:
mode:
Diffstat (limited to 'lib.go')
-rw-r--r--lib.go5
1 files changed, 1 insertions, 4 deletions
diff --git a/lib.go b/lib.go
index 00a67d9..df2af4a 100644
--- a/lib.go
+++ b/lib.go
@@ -63,10 +63,7 @@ func (f *File) readXML(name string) []byte {
// saveFileList provides a function to update given file content in file list
// of XLSX.
func (f *File) saveFileList(name string, content []byte) {
- newContent := make([]byte, 0, len(XMLHeader)+len(content))
- newContent = append(newContent, []byte(XMLHeader)...)
- newContent = append(newContent, content...)
- f.Pkg.Store(name, newContent)
+ f.Pkg.Store(name, append([]byte(XMLHeader), content...))
}
// Read file content as string in a archive file.