From 52a8ab65e21016e4844b74356102cd9d6d8479b8 Mon Sep 17 00:00:00 2001 From: ZhangYunHao Date: Fri, 12 Feb 2021 17:47:38 +0800 Subject: [PATCH] fix s2b go vet warning (#967) --- bytesconv.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bytesconv.go b/bytesconv.go index 222435a5ac..813376e9f2 100644 --- a/bytesconv.go +++ b/bytesconv.go @@ -343,7 +343,7 @@ func s2b(s string) (b []byte) { /* #nosec G103 */ bh := (*reflect.SliceHeader)(unsafe.Pointer(&b)) /* #nosec G103 */ - sh := *(*reflect.StringHeader)(unsafe.Pointer(&s)) + sh := (*reflect.StringHeader)(unsafe.Pointer(&s)) bh.Data = sh.Data bh.Len = sh.Len bh.Cap = sh.Len