mirror of
https://github.com/scratchfoundation/golangci-lint.git
synced 2025-07-14 13:44:23 -04:00
12 lines
435 B
Go
12 lines
435 B
Go
//golangcitest:args -Emirror
|
|
package testdata
|
|
|
|
import (
|
|
"strings"
|
|
"unicode/utf8"
|
|
)
|
|
|
|
func foobar() {
|
|
_ = utf8.RuneCount([]byte("foobar")) // want `avoid allocations with utf8\.RuneCountInString`
|
|
_ = strings.Compare(string([]byte{'f', 'o', 'o', 'b', 'a', 'r'}), string([]byte{'f', 'o', 'o', 'b', 'a', 'r'})) // want `avoid allocations with bytes\.Compare`
|
|
}
|