Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(build): upgrade to Go v1.21 ✨ #1128

Merged
merged 3 commits into from
Apr 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading