Skip to content

Commit

Permalink
Merge pull request #365 from cuishuang/master
Browse files Browse the repository at this point in the history
fix: fix slice init length
  • Loading branch information
brianvoe authored Sep 27, 2024
2 parents 356c601 + a585c75 commit 6e8d20a
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 6e8d20a

Please sign in to comment.