diff options
-rw-r--r-- | main.go | 5 | ||||
-rw-r--r-- | unsafe.go | 7 |
2 files changed, 7 insertions, 5 deletions
@@ -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)) -} diff --git a/unsafe.go b/unsafe.go new file mode 100644 index 0000000..4a7b2d0 --- /dev/null +++ b/unsafe.go @@ -0,0 +1,7 @@ +package main + +import "unsafe" + +func stringToBytes(s string) (bytes []byte) { + return unsafe.Slice(unsafe.StringData(s), len(s)) +} |