diff options
author | xuri <xuri.me@gmail.com> | 2020-04-02 00:41:14 +0800 |
---|---|---|
committer | xuri <xuri.me@gmail.com> | 2020-04-05 13:51:00 +0800 |
commit | 0f2a9053246c3ae45e6c7ba911a1fb135664abdf (patch) | |
tree | 7428d041bcd06956933003598fa56b0b0c246945 /sheet.go | |
parent | 59f6af21a378fdde21422a92b79a7b03bba313d4 (diff) |
Performance improvements
Diffstat (limited to 'sheet.go')
-rw-r--r-- | sheet.go | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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 |