From e15386feb2bea50f3f264fb9da8bcfb7b7d1c702 Mon Sep 17 00:00:00 2001 From: Andy Pan Date: Sat, 23 Jan 2021 20:22:02 +0800 Subject: [PATCH] Remove the tedious named return value --- internal/bytesconv/bytesconv.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/bytesconv/bytesconv.go b/internal/bytesconv/bytesconv.go index fdad2015c4..86e4c4d44c 100644 --- a/internal/bytesconv/bytesconv.go +++ b/internal/bytesconv/bytesconv.go @@ -9,7 +9,7 @@ import ( ) // StringToBytes converts string to byte slice without a memory allocation. -func StringToBytes(s string) (b []byte) { +func StringToBytes(s string) []byte { return *(*[]byte)(unsafe.Pointer( &struct { string