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

feat: pack use io.Copy

This commit is contained in:
源文雨
2023-02-09 14:29:32 +08:00
parent 2d8e706815
commit 74352e9b4d
2 changed files with 28 additions and 20 deletions

View File

@@ -575,10 +575,13 @@ func TestMarshalDrawingStructure(t *testing.T) {
nextPara := w.AddParagraph()
nextPara.AddLink("google", `http://google.com`)
doc, err := marshal(w.Document)
f, err := os.Create("test.xml")
if err != nil {
t.Fatal(err)
}
_, err = marshaller{data: w.Document}.WriteTo(f)
if err != nil {
t.Fatal(err)
}
os.WriteFile("test.xml", doc, 0644)
t.Fail()
}