1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-17 09:57:01 +00:00

update kataras/jwt module

This commit is contained in:
Gerasimos (Makis) Maropoulos
2023-08-17 12:06:51 +03:00
parent a727e29031
commit 2f85ad1cfd
4 changed files with 6 additions and 6 deletions

View File

@@ -4178,11 +4178,11 @@ var WriteJSON = func(ctx *Context, v interface{}, options *JSON) error {
// See https://golang.org/src/strings/builder.go#L45
// func bytesToString(b []byte) string {
// return *(*string)(unsafe.Pointer(&b))
// return unsafe.String(unsafe.SliceData(b), len(b))
// }
func stringToBytes(s string) []byte {
return *(*[]byte)(unsafe.Pointer(&s))
return unsafe.Slice(unsafe.StringData(s), len(s))
}
type (