Skip to content

Commit 73e4420

Browse files
committed
update to go1.21
1 parent 2f3b669 commit 73e4420

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module github.com/kataras/jwt
22

3-
go 1.19
3+
go 1.21

util.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ import "unsafe"
44

55
// BytesToString converts a slice of bytes to string without memory allocation.
66
func BytesToString(b []byte) string {
7-
return *(*string)(unsafe.Pointer(&b))
7+
return unsafe.String(unsafe.SliceData(b), len(b))
88
}

0 commit comments

Comments
 (0)