summaryrefslogtreecommitdiff
path: root/sheet.go
diff options
context:
space:
mode:
authorxuri <xuri.me@gmail.com>2020-04-02 00:41:14 +0800
committerxuri <xuri.me@gmail.com>2020-04-05 13:51:00 +0800
commit0f2a9053246c3ae45e6c7ba911a1fb135664abdf (patch)
tree7428d041bcd06956933003598fa56b0b0c246945 /sheet.go
parent59f6af21a378fdde21422a92b79a7b03bba313d4 (diff)
Performance improvements
Diffstat (limited to 'sheet.go')
-rw-r--r--sheet.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/sheet.go b/sheet.go
index 6ddd629..a3276c2 100644
--- a/sheet.go
+++ b/sheet.go
@@ -206,9 +206,9 @@ func (f *File) setAppXML() {
// requirements about the structure of the input XML. This function is a
// horrible hack to fix that after the XML marshalling is completed.
func replaceRelationshipsBytes(content []byte) []byte {
- oldXmlns := []byte(`xmlns:relationships="http://schemas.openxmlformats.org/officeDocument/2006/relationships" relationships`)
- newXmlns := []byte("r")
- return bytes.Replace(content, oldXmlns, newXmlns, -1)
+ oldXmlns := stringToBytes(`xmlns:relationships="http://schemas.openxmlformats.org/officeDocument/2006/relationships" relationships`)
+ newXmlns := stringToBytes("r")
+ return bytesReplace(content, oldXmlns, newXmlns, -1)
}
// SetActiveSheet provides function to set default active worksheet of XLSX by