Skip to content

Commit

Permalink
support Go 1.22
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangyunhao116 committed Mar 12, 2024
1 parent 62a909b commit cda9205
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
go-version: [1.16, 1.17, 1.18]
go-version: [1.13, 1.18, 1.19, 1.22]
os:
[
ubuntu-latest,
Expand Down
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/zhangyunhao116/fastrand

go 1.15
go 1.13
File renamed without changes.
4 changes: 2 additions & 2 deletions runtime_go119.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//go:build go1.19
// +build go1.19
//go:build go1.19 && !go1.22
// +build go1.19,!go1.22

package fastrand

Expand Down
17 changes: 17 additions & 0 deletions runtime_go122.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
//go:build go1.22
// +build go1.22

package fastrand

import (
_ "unsafe"
)

//go:linkname runtimefastrand runtime.cheaprand
func runtimefastrand() uint32

//go:linkname runtimefastrand64 runtime.cheaprand64
func runtimefastrand64() uint64

//go:linkname runtimefastrandu runtime.cheaprandu
func runtimefastrandu() uint

0 comments on commit cda9205

Please sign in to comment.