mirror of
https://gitlab.com/mbugroup/lti-api.git
synced 2026-05-24 15:25:43 +00:00
.
This commit is contained in:
committed by
Adnan Zahir
parent
d41e16cab9
commit
ad815b3412
+11
@@ -0,0 +1,11 @@
|
||||
//go:build go1.20
|
||||
|
||||
package fasthttp
|
||||
|
||||
import "unsafe"
|
||||
|
||||
// b2s converts byte slice to a string without memory allocation.
|
||||
// See https://groups.google.com/forum/#!msg/Golang-Nuts/ENgbUzYvCuU/90yGx7GUAgAJ .
|
||||
func b2s(b []byte) string {
|
||||
return unsafe.String(unsafe.SliceData(b), len(b))
|
||||
}
|
||||
Reference in New Issue
Block a user