Skip to content

Commit 1ec5ab9

Browse files
committed
chore(gha): fix macos action/setup-go@v4 cache miss.
Set the same Go version as specified in the `go.mod` because of the issue below: - actions/setup-go#424 Additionally, the rand.Seed() was updated to use rand.New(rand.NewSource(seed)) because the former was removed from Go1.20. Signed-off-by: Tiago Natel <[email protected]>
1 parent 017241e commit 1ec5ab9

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

cmd/terramate/cli/cloud_credential_google.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,13 +148,13 @@ func startServer(
148148
}
149149
}()
150150

151-
rand.Seed(time.Now().UnixNano())
151+
rng := rand.New(rand.NewSource(time.Now().UnixNano()))
152152

153153
var ln net.Listener
154154
const maxretry = 5
155155
var retry int
156156
for retry = 0; retry < maxretry; retry++ {
157-
addr := "127.0.0.1:" + strconv.Itoa(minPort+rand.Intn(maxPort-minPort))
157+
addr := "127.0.0.1:" + strconv.Itoa(minPort+rng.Intn(maxPort-minPort))
158158
s.Addr = addr
159159

160160
ln, err = net.Listen("tcp", addr)

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/terramate-io/terramate
22

3-
go 1.18
3+
go 1.20
44

55
require (
66
github.com/alecthomas/kong v0.7.1

0 commit comments

Comments
 (0)