diff --git a/README.md b/README.md index f0f0d73..0d1cfab 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,6 @@ # php2go [![GoDoc](https://godoc.org/github.com/syyongx/php2go?status.svg)](https://godoc.org/github.com/syyongx/php2go) -[![Go Report Card](https://goreportcard.com/badge/github.com/syyongx/php2go)](https://goreportcard.com/report/github.com/syyongx/php2go) [![MIT licensed][3]][4] [3]: https://img.shields.io/badge/license-MIT-blue.svg diff --git a/php.go b/php.go index 35bd7e0..7145eeb 100644 --- a/php.go +++ b/php.go @@ -462,8 +462,8 @@ func Wordwrap(str string, width uint, br string) string { if br == "" { br = "\n" } - init := make([]byte, 0, len(str)) - buf := bytes.NewBuffer(init) + + buf := bytes.NewBuffer(make([]byte, 0, len(str))) var current uint var wordbuf, spacebuf bytes.Buffer for _, char := range str { @@ -824,7 +824,7 @@ func Levenshtein(str1, str2 string, costIns, costRep, costDel int) int { return -1 } - tmp := make([]int, l2+1) + var tmp []int p1 := make([]int, l2+1) p2 := make([]int, l2+1) var c0, c1, c2 int