mirror of
https://gitlab.com/mbugroup/lti-api.git
synced 2026-05-23 23:05:44 +00:00
.
This commit is contained in:
+10
@@ -0,0 +1,10 @@
|
||||
//go:build go1.20
|
||||
|
||||
package fasthttp
|
||||
|
||||
import "unsafe"
|
||||
|
||||
// s2b converts string to a byte slice without memory allocation.
|
||||
func s2b(s string) []byte {
|
||||
return unsafe.Slice(unsafe.StringData(s), len(s))
|
||||
}
|
||||
Reference in New Issue
Block a user