1
0
mirror of https://github.com/fumiama/go-docx.git synced 2026-06-11 19:10:24 +08:00
This commit is contained in:
Gonzalo Fernandez-Victorio
2021-05-11 12:40:58 +01:00
parent 2c86c9ce8b
commit 54bd3d2d4a
9 changed files with 129 additions and 15 deletions

View File

@@ -3,7 +3,8 @@ package docxlib
import (
"archive/zip"
"encoding/xml"
"fmt"
"github.com/golang/glog"
)
// This receives a zip file writer (word documents are a zip with multiple xml inside)
@@ -45,7 +46,7 @@ func (f *DocxLib) pack(zipWriter *zip.Writer) (err error) {
func marshal(data interface{}) (out string, err error) {
body, err := xml.Marshal(data)
if err != nil {
fmt.Println(err)
glog.Errorln("Error marshalling", err)
return
}