Skip to content

Commit

Permalink
Merge pull request #49 from cuishuang/master
Browse files Browse the repository at this point in the history
fix: fix slice init length
  • Loading branch information
syyongx authored Oct 9, 2024
2 parents 481c9a3 + 802eeac commit f3e8b85
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 f3e8b85

Please sign in to comment.