Skip to content

Commit

Permalink
feat(build): upgrade to Go v1.21 ✨ (#1128)
Browse files Browse the repository at this point in the history
  • Loading branch information
pranav-new-relic authored Apr 30, 2024
1 parent 25b56c3 commit efe41f2
Show file tree
Hide file tree
Showing 9 changed files with 19 additions and 19 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/compile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ jobs:
runs-on: ${{ matrix.platform }}
steps:
- name: Install Go
uses: actions/setup-go@v3
uses: actions/setup-go@v5
with:
go-version: 1.19.x
go-version: 1.21.x

- name: Add GOBIN to PATH
run: echo "$(go env GOPATH)/bin" >> $GITHUB_PATH
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/generate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Install Go
uses: actions/setup-go@v3
uses: actions/setup-go@v5
with:
go-version: 1.19.x
go-version: 1.21.x

- name: Add GOBIN to PATH
run: echo "$(go env GOPATH)/bin" >> $GITHUB_PATH
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Install Go
uses: actions/setup-go@v3
uses: actions/setup-go@v5
with:
go-version: 1.19.x
go-version: 1.21.x

- name: Add GOBIN to PATH
run: echo "$(go env GOPATH)/bin" >> $GITHUB_PATH
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Install Go
uses: actions/setup-go@v3
uses: actions/setup-go@v5
with:
go-version: 1.19.x
go-version: 1.21.x

- name: Add GOBIN to PATH
run: echo "$(go env GOPATH)/bin" >> $GITHUB_PATH
Expand All @@ -39,9 +39,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Install Go
uses: actions/setup-go@v3
uses: actions/setup-go@v5
with:
go-version: 1.19.x
go-version: 1.21.x

- name: Add GOBIN to PATH
run: echo "$(go env GOPATH)/bin" >> $GITHUB_PATH
Expand Down Expand Up @@ -79,9 +79,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Install Go
uses: actions/setup-go@v3
uses: actions/setup-go@v5
with:
go-version: 1.19.x
go-version: 1.21.x

- name: Add GOBIN to PATH
run: echo "$(go env GOPATH)/bin" >> $GITHUB_PATH
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ Follow the steps below to add `github.com/newrelic/newrelic-client-go` as a depe
```
module example.com/yourmodule
go 1.19
go 1.21
require (
github.com/newrelic/newrelic-client-go/v2 v2.0.1
Expand Down Expand Up @@ -131,7 +131,7 @@ Keep in mind that when you submit your pull request, you'll need to sign the CLA

### Requirements

- Go 1.19+
- Go 1.21+
- GNU Make
- git

Expand Down
2 changes: 1 addition & 1 deletion build/tools.mk
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ BUILD_DIR ?= ./bin/
TOOL_DIR ?= tools
TOOL_CONFIG ?= $(TOOL_DIR)/tools.go

GOTOOLS ?= $(shell cd $(TOOL_DIR) && go list -f '{{ .Imports }}' -tags tools |tr -d '[]')
GOTOOLS ?= $(shell cd $(TOOL_DIR) && go list -e -f '{{ .Imports }}' -tags tools |tr -d '[]')

tools: check-version
@echo "=== $(PROJECT_NAME) === [ tools ]: Installing tools required by the project..."
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/newrelic/newrelic-client-go/v2

go 1.19
go 1.21

require (
github.com/elazarl/goproxy v0.0.0-20231117061959-7cc037d33fb5
Expand Down
4 changes: 2 additions & 2 deletions pkg/testhelpers/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (
"math/rand"
"os"
"strconv"
"time"
)

var (
Expand All @@ -21,7 +20,8 @@ const IntegrationTestAccountID = 3806526

// RandSeq is used to get a string made up of n random lowercase letters.
func RandSeq(n int) string {
rand.Seed(time.Now().UnixNano())
// commented the following line out, since this no longer works with go1.21 and needs no alternative, as seeding isn't needed
// rand.Seed(time.Now().UnixNano())
b := make([]rune, n)
for i := range b {
b[i] = letters[rand.Intn(len(letters))]
Expand Down
2 changes: 1 addition & 1 deletion tools/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/newrelic/newrelic-client-go/v2/tools

go 1.19
go 1.21

require (
github.com/caarlos0/svu v1.9.0
Expand Down

0 comments on commit efe41f2

Please sign in to comment.