From a5c7b4359722296eba8a52923a8133d1f4367cf0 Mon Sep 17 00:00:00 2001 From: Runxi Yu Date: Sun, 17 Aug 2025 14:01:34 +0800 Subject: Lint misc --- forged/internal/common/misc/unsafe.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'forged/internal/common/misc/unsafe.go') diff --git a/forged/internal/common/misc/unsafe.go b/forged/internal/common/misc/unsafe.go index 6c2192f..d827e7f 100644 --- a/forged/internal/common/misc/unsafe.go +++ b/forged/internal/common/misc/unsafe.go @@ -9,12 +9,12 @@ import "unsafe" // Memory is borrowed from the string. // The resulting byte slice must not be modified in any form. func StringToBytes(s string) (bytes []byte) { - return unsafe.Slice(unsafe.StringData(s), len(s)) + return unsafe.Slice(unsafe.StringData(s), len(s)) //#nosec G103 } // BytesToString converts a byte slice to a string without copying the bytes. // Memory is borrowed from the byte slice. // The source byte slice must not be modified. func BytesToString(b []byte) string { - return unsafe.String(unsafe.SliceData(b), len(b)) + return unsafe.String(unsafe.SliceData(b), len(b)) //#nosec G103 } -- cgit v1.2.3