Skip to content

Commit

Permalink
Update go version from 1.19 to 1.21 (openconfig#2270)
Browse files Browse the repository at this point in the history
* update go version from 1.19 to 1.21

* update seed which is deprecated

* removing call to random seed

* Free up space for staticcheck (openconfig#2279)

---------

Co-authored-by: Brandon Stoll <[email protected]>
  • Loading branch information
prinikasn and bstoll authored Oct 24, 2023
1 parent 29bd128 commit 75fbbb0
Show file tree
Hide file tree
Showing 6 changed files with 50 additions and 15 deletions.
20 changes: 13 additions & 7 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ jobs:
- name: Set up Go
uses: actions/[email protected]
with:
go-version: 1.19.x
go-version: 1.21.x
- name: Cache
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: |
~/go/pkg/mod
Expand All @@ -33,9 +33,9 @@ jobs:
- name: Set up Go
uses: actions/[email protected]
with:
go-version: 1.19.x
go-version: 1.21.x
- name: Cache
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: |
~/go/pkg/mod
Expand All @@ -58,11 +58,11 @@ jobs:
- name: Install go
uses: actions/setup-go@v2
with:
go-version: '1.19'
go-version: '1.21'
- name: Checkout code
uses: actions/checkout@v3
- name: Cache
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: |
~/go/pkg/mod
Expand Down Expand Up @@ -103,4 +103,10 @@ jobs:
- name: Get staticcheck
run: go install honnef.co/go/tools/cmd/staticcheck@latest
- name: Run staticcheck
run: GOGC=30 staticcheck ./...
run: |
# staticcheck requires a lot of free disk space in /tmp. Free up worker
# space by removing unnecessary tooling.
sudo rm -rf /usr/share/dotnet
sudo rm -rf /usr/local/lib/android
sudo rm -rf /opt/hostedtoolcache/CodeQL
GOGC=30 staticcheck ./...
6 changes: 3 additions & 3 deletions .github/workflows/protobufs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Install go
uses: actions/setup-go@v2
with:
go-version: '1.19'
go-version: '1.21'
- name: Checkout code
uses: actions/checkout@v3
- name: Cache
Expand Down Expand Up @@ -87,13 +87,13 @@ jobs:
- name: Install go
uses: actions/setup-go@v2
with:
go-version: '1.19'
go-version: '1.21'
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Cache
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: |
~/go/pkg/mod
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/wiki.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ jobs:
- name: Set up Go
uses: actions/[email protected]
with:
go-version: 1.19.x
go-version: 1.21.x
- name: Cache
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: |
~/go/pkg/mod
Expand Down
2 changes: 0 additions & 2 deletions feature/gribi/otg_tests/weighted_balancing_test/setup_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -441,8 +441,6 @@ func generateRandomIpList(cidr string, count uint32) []string {
for net := range netsCh {
gotNets = append(gotNets, strings.ReplaceAll(net, "/32", ""))
}
// Seed the random number generator with the current time
rand.Seed(time.Now().UnixNano())

// Make a copy of the input slice to avoid modifying the original
randomized := make([]string, len(gotNets))
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/openconfig/featureprofiles

go 1.19
go 1.21

require (
cloud.google.com/go/pubsub v1.33.0
Expand Down
Loading

0 comments on commit 75fbbb0

Please sign in to comment.