Skip to content

Commit

Permalink
fix: fix slice init length
Browse files Browse the repository at this point in the history
  • Loading branch information
cuishuang authored Oct 4, 2024
1 parent 481c9a3 commit 802eeac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion php.go
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,7 @@ func Strtr(haystack string, params ...interface{}) string {
if length == 0 {
return haystack
}
oldnew := make([]string, length*2)
oldnew := make([]string, 0, length*2)
for o, n := range pairs {
if o == "" {
return haystack
Expand Down

0 comments on commit 802eeac

Please sign in to comment.