1
0
mirror of https://github.com/fumiama/go-docx.git synced 2026-06-08 17:20:26 +08:00

reduce unsafe

This commit is contained in:
源文雨
2023-03-04 21:31:03 +08:00
parent 1e227341ee
commit ff131af5fa
3 changed files with 13 additions and 23 deletions

View File

@@ -50,7 +50,7 @@ func TestUnmarshalPlainStructure(t *testing.T) {
t.Fatalf("We expected %d paragraphs, we got %d", tc.numParagraphs, len(doc.Body.Items))
}
for i, it := range doc.Body.Items {
p := it.(Paragraph)
p := it.(*Paragraph)
if len(p.Children) == 0 {
t.Fatalf("We were not able to parse paragraph %d", i)
}