1
0
mirror of https://github.com/fumiama/go-docx.git synced 2026-06-12 11:40:28 +08:00

fix: unmarshal RunProperties

This commit is contained in:
源文雨
2023-02-10 13:52:11 +08:00
parent 9aae5582ad
commit 9a504d59dc
10 changed files with 233 additions and 158 deletions

View File

@@ -1,16 +1,16 @@
package docxlib
// This contains internal functions needed to unpack (read) a zip file
import (
"archive/zip"
"bytes"
"encoding/xml"
)
// This receives a zip file (word documents are a zip with multiple xml inside)
// unpack receives a zip file (word documents are a zip with multiple xml inside)
// and parses the files that are relevant for us:
// 1.-Document
// 2.-Relationships
//
// 1. Document
// 2. Relationships
func unpack(zipReader *zip.Reader) (docx *Docx, err error) {
docx = new(Docx)
for _, f := range zipReader.File {