From 2a909b0888a485d619af20b30f21fe31f0de8f6d Mon Sep 17 00:00:00 2001 From: Runxi Yu Date: Sun, 23 Mar 2025 12:02:14 +0800 Subject: Separate unsafe operations to unsafe.go --- main.go | 5 ----- 1 file changed, 5 deletions(-) (limited to 'main.go') diff --git a/main.go b/main.go index 0c44222..bef172b 100644 --- a/main.go +++ b/main.go @@ -15,7 +15,6 @@ import ( "net/url" "strings" "time" - "unsafe" ) var ( @@ -193,7 +192,3 @@ func makeSignedToken(request *http.Request) []byte { func proxyRequest(writer http.ResponseWriter, request *http.Request) { reverseProxy.ServeHTTP(writer, request) } - -func stringToBytes(s string) (bytes []byte) { - return unsafe.Slice(unsafe.StringData(s), len(s)) -} -- cgit v1.2.3