Skip to content

Commit

Permalink
fix: fix slice init length
Browse files Browse the repository at this point in the history
Signed-off-by: cuishuang <imcusg@gmail.com>
  • Loading branch information
cuishuang committed Sep 27, 2024
1 parent 05bf36a commit a585c75
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion xml.go
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ func xmlFunc(f *Faker, xo *XMLOptions) ([]byte, error) {
}

// Get key order by order of fields array
keyOrder := make([]string, len(xo.Fields))
keyOrder := make([]string, 0, len(xo.Fields))
for _, f := range xo.Fields {
keyOrder = append(keyOrder, f.Name)
}
Expand Down

0 comments on commit a585c75

Please sign in to comment.