projects
/
dotfiles
/
.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Giant blob of minor changes
[dotfiles/.git]
/
.config
/
coc
/
extensions
/
coc-go-data
/
tools
/
pkg
/
mod
/
honnef.co
/
go
/
tools@v0.0.1-2020.1.5
/
staticcheck
/
testdata
/
src
/
CheckMapBytesKey
/
key.go
1
package pkg
2
3
func fn() {
4
var m map[string]int
5
var b []byte
6
_ = m[string(b)]
7
_ = m[string(b)]
8
s1 := string(b) // want `m\[string\(key\)\] would be more efficient than k := string\(key\); m\[k\]`
9
_ = m[s1]
10
_ = m[s1]
11
12
s2 := string(b)
13
_ = m[s2]
14
_ = m[s2]
15
println(s2)
16
}