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

This commit is contained in:
Robert Zaremba 2021-02-23 14:38:37 +01:00 committed by GitHub
parent 4c70268c9b
commit 8db9bbba04
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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
}