Skip to content

Commit

Permalink
fix: use rand v1
Browse files Browse the repository at this point in the history
v2 is not included in go 1.21
  • Loading branch information
Shawn Yu authored and Shawn Yu committed May 13, 2024
1 parent 75e8ebe commit c81d6c5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,5 @@ jobs:

- uses: cli/gh-extension-precompile@v1
with:
go_version: "1.22"
go_version: "1.21"

6 changes: 4 additions & 2 deletions utils/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ import (
"github.com/google/go-github/v61/github"
"github.com/ktr0731/go-fuzzyfinder"
"github.com/shawnyu5/gh-ac/gh"
"math/rand/v2"
// TODO: use V2 once this issue is solved. v2 is not included in go 1.21
// https://github.com/cli/gh-extension-precompile/issues/50
"math/rand"
"os"
"os/exec"
"strings"
Expand Down Expand Up @@ -72,7 +74,7 @@ func OpenInBrowser(args []string) error {

// RandomSpinner creates a random spinner
func RandomSpinner(suffix string) *spinner.Spinner {
s := spinner.New(spinner.CharSets[rand.IntN(90)], 100*time.Millisecond)
s := spinner.New(spinner.CharSets[rand.Intn(90)], 100*time.Millisecond)
s.Suffix = suffix
return s
}
Expand Down

0 comments on commit c81d6c5

Please sign in to comment.