linter: ignore false positives in types/address (#8674)

This commit is contained in:
Robert Zaremba
2021-02-23 13:38:37 +00:00
committed by GitHub
parent 4c70268c9b
commit 8db9bbba04
+2 -2
View File
@@ -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
}