-
Notifications
You must be signed in to change notification settings - Fork 13
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
Update Go Module to Go 1.20 Minimum #180
Comments
bflad
added a commit
that referenced
this issue
Sep 6, 2023
…ndency Reference: https://pkg.go.dev/errors#Join Reference: https://pkg.go.dev/math/rand#Seed Reference: #99 Reference: #180 Previously from `golangci-lint` after Go 1.20 upgrade: ``` helper/acctest/random.go:24:2: SA1019: rand.Seed has been deprecated since Go 1.20 and an alternative has been available since Go 1.0: As of Go 1.20 there is no reason to call Seed with a random value. Programs that call Seed with a known value to get a specific sequence of results should use New(NewSource(seed)) to obtain a local random generator. (staticcheck) rand.Seed(time.Now().UTC().UnixNano()) ^ ``` Fully removing the go-multierror dependency will require some other upstream updates, e.g. ``` # github.com/hashicorp/go-multierror github.com/hashicorp/terraform-plugin-testing/helper/resource github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema github.com/hashicorp/go-multierror ```
bflad
added a commit
that referenced
this issue
Sep 6, 2023
…ndency (#181) Reference: https://pkg.go.dev/errors#Join Reference: https://pkg.go.dev/math/rand#Seed Reference: #99 Reference: #180 Previously from `golangci-lint` after Go 1.20 upgrade: ``` helper/acctest/random.go:24:2: SA1019: rand.Seed has been deprecated since Go 1.20 and an alternative has been available since Go 1.0: As of Go 1.20 there is no reason to call Seed with a random value. Programs that call Seed with a known value to get a specific sequence of results should use New(NewSource(seed)) to obtain a local random generator. (staticcheck) rand.Seed(time.Now().UTC().UnixNano()) ^ ``` Fully removing the go-multierror dependency will require some other upstream updates, e.g. ``` # github.com/hashicorp/go-multierror github.com/hashicorp/terraform-plugin-testing/helper/resource github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema github.com/hashicorp/go-multierror ```
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
terraform-plugin-testing version
Use cases
Following the Go support policy and given the ecosystem availability of the latest Go minor version, it's time to upgrade. This will ensure that this project can use recent improvements to the Go runtime, standard library functionality, and continue to receive security updates.
Proposal
go mod edit -go=1.20 go mod tidy go fix ./... cd tools go mod edit -go=1.20 go mod tidy
.github/workflows/*.yml
) use 1.21 in place of any 1.20 and 1.20 in place of any 1.19 or earlierReferences
The text was updated successfully, but these errors were encountered: