Skip to content

Commit

Permalink
update to go1.21
Browse files Browse the repository at this point in the history
  • Loading branch information
kataras committed Aug 17, 2023
1 parent 2f3b669 commit 73e4420
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module github.com/kataras/jwt

go 1.19
go 1.21
2 changes: 1 addition & 1 deletion util.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ import "unsafe"

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

Check failure on line 7 in util.go

View workflow job for this annotation

GitHub Actions / Test (1.18)

undefined: unsafe.String

Check failure on line 7 in util.go

View workflow job for this annotation

GitHub Actions / Test (1.18)

undefined: unsafe.SliceData
}

0 comments on commit 73e4420

Please sign in to comment.