Skip to content

Commit

Permalink
linter: ignore false positives in types/address (#8674)
Browse files Browse the repository at this point in the history
  • Loading branch information
robert-zaremba authored Feb 23, 2021
1 parent 4c70268 commit 8db9bbb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions types/address/hash.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ func Module(moduleName string, key []byte) []byte {
// unsafeStrToByteArray uses unsafe to convert string into byte array. Returned array
// cannot be altered after this functions is called
func unsafeStrToByteArray(s string) []byte {
sh := *(*reflect.SliceHeader)(unsafe.Pointer(&s))
sh := *(*reflect.SliceHeader)(unsafe.Pointer(&s)) // nolint:govet
sh.Cap = sh.Len
bs := *(*[]byte)(unsafe.Pointer(&sh))
bs := *(*[]byte)(unsafe.Pointer(&sh)) // nolint:govet
return bs
}

0 comments on commit 8db9bbb

Please sign in to comment.