diff --git a/types/address/hash.go b/types/address/hash.go index 8c0cddae02e6..d6a249a8a287 100644 --- a/types/address/hash.go +++ b/types/address/hash.go @@ -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 }