Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 8089837

Browse files
chase-ktshearn89
andauthoredSep 24, 2024··
Upgrade Go Version Used (#39)
* Add functionality to use asdf to manage repo versions * Update go version to 1.23 * Update Go version * Update GoReleaser config * Update linter * Recreate go.mod via go mod init <packagename> --------- Co-authored-by: Chase Dickinson <[email protected]> Co-authored-by: Alex Shearn <[email protected]>
1 parent ef21deb commit 8089837

File tree

6 files changed

+190
-309
lines changed

6 files changed

+190
-309
lines changed
 

‎.envrc

+1
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1+
use asdf
12
use flake

‎.github/workflows/go.yaml

+5-6
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,14 @@ name: Go
55

66
on:
77
push:
8-
branches: [ "main" ]
8+
branches: ["main"]
99
pull_request:
10-
branches: [ "main" ]
10+
branches: ["main"]
1111

1212
env:
1313
TF_ACC: 1
1414

1515
jobs:
16-
1716
build:
1817
runs-on: ubuntu-latest
1918
steps:
@@ -22,13 +21,13 @@ jobs:
2221
- name: Set up Go
2322
uses: actions/setup-go@v3
2423
with:
25-
go-version: 1.19
24+
go-version: 1.23
2625
cache: true
2726

2827
- name: Run linter
29-
uses: golangci/golangci-lint-action@v3
28+
uses: golangci/golangci-lint-action@v6
3029
with:
31-
version: v1.51.2
30+
version: v1.60
3231

3332
- name: Build
3433
run: go build -v ./...

‎.goreleaser.yml

+35-33
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,49 @@
11
# Visit https://goreleaser.com for documentation on how to customize this
22
# behavior.
3+
version: 2
4+
35
before:
46
hooks:
57
# this is just an example and not a requirement for provider building/publishing
68
- go mod tidy
79
builds:
8-
- env:
9-
# goreleaser does not work with CGO, it could also complicate
10-
# usage by users in CI/CD systems like Terraform Cloud where
11-
# they are unable to install libraries.
12-
- CGO_ENABLED=0
13-
mod_timestamp: '{{ .CommitTimestamp }}'
14-
flags:
15-
- -trimpath
16-
ldflags:
17-
- '-s -w -X main.version={{.Version}} -X main.commit={{.Commit}}'
18-
goos:
19-
- freebsd
20-
- windows
21-
- linux
22-
- darwin
23-
goarch:
24-
- amd64
25-
- '386'
26-
- arm
27-
- arm64
28-
ignore:
29-
- goos: darwin
30-
goarch: '386'
31-
binary: '{{ .ProjectName }}_v{{ .Version }}'
10+
- env:
11+
# goreleaser does not work with CGO, it could also complicate
12+
# usage by users in CI/CD systems like Terraform Cloud where
13+
# they are unable to install libraries.
14+
- CGO_ENABLED=0
15+
mod_timestamp: "{{ .CommitTimestamp }}"
16+
flags:
17+
- -trimpath
18+
ldflags:
19+
- "-s -w -X main.version={{.Version}} -X main.commit={{.Commit}}"
20+
goos:
21+
- freebsd
22+
- windows
23+
- linux
24+
- darwin
25+
goarch:
26+
- amd64
27+
- "386"
28+
- arm
29+
- arm64
30+
ignore:
31+
- goos: darwin
32+
goarch: "386"
33+
binary: "{{ .ProjectName }}_v{{ .Version }}"
3234
archives:
33-
- format: zip
34-
name_template: '{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}'
35+
- format: zip
36+
name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
3537
checksum:
3638
extra_files:
37-
- glob: 'terraform-registry-manifest.json'
38-
name_template: '{{ .ProjectName }}_{{ .Version }}_manifest.json'
39-
name_template: '{{ .ProjectName }}_{{ .Version }}_SHA256SUMS'
39+
- glob: "terraform-registry-manifest.json"
40+
name_template: "{{ .ProjectName }}_{{ .Version }}_manifest.json"
41+
name_template: "{{ .ProjectName }}_{{ .Version }}_SHA256SUMS"
4042
algorithm: sha256
4143
signs:
4244
- artifacts: checksum
4345
args:
44-
# if you are using this in a GitHub action or some other automated pipeline, you
46+
# if you are using this in a GitHub action or some other automated pipeline, you
4547
# need to pass the batch flag to indicate its not interactive.
4648
- "--batch"
4749
- "--local-user"
@@ -52,9 +54,9 @@ signs:
5254
- "${artifact}"
5355
release:
5456
extra_files:
55-
- glob: 'terraform-registry-manifest.json'
56-
name_template: '{{ .ProjectName }}_{{ .Version }}_manifest.json'
57+
- glob: "terraform-registry-manifest.json"
58+
name_template: "{{ .ProjectName }}_{{ .Version }}_manifest.json"
5759
# If you want to manually examine the release before its live, uncomment this line:
5860
# draft: true
5961
changelog:
60-
skip: true
62+
disable: true

‎.tool-versions

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
golang 1.23.1

‎go.mod

+37-33
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,43 @@
11
module github.com/octoenergy/terraform-provider-splitpolicies
22

3-
go 1.19
3+
go 1.23.1
44

55
require (
6-
github.com/google/go-cmp v0.5.9
7-
github.com/hashicorp/terraform-plugin-framework v1.2.0
8-
github.com/hashicorp/terraform-plugin-go v0.14.3
9-
github.com/hashicorp/terraform-plugin-log v0.8.0
10-
github.com/hashicorp/terraform-plugin-sdk/v2 v2.25.0
11-
github.com/stretchr/testify v1.8.2
6+
github.com/google/go-cmp v0.6.0
7+
github.com/hashicorp/terraform-plugin-framework v1.12.0
8+
github.com/hashicorp/terraform-plugin-go v0.24.0
9+
github.com/hashicorp/terraform-plugin-log v0.9.0
10+
github.com/hashicorp/terraform-plugin-sdk/v2 v2.34.0
11+
github.com/stretchr/testify v1.9.0
1212
)
1313

1414
require (
15+
github.com/ProtonMail/go-crypto v1.1.0-alpha.2 // indirect
1516
github.com/agext/levenshtein v1.2.2 // indirect
16-
github.com/apparentlymart/go-textseg/v13 v13.0.0 // indirect
17+
github.com/apparentlymart/go-textseg/v15 v15.0.0 // indirect
18+
github.com/cloudflare/circl v1.3.7 // indirect
1719
github.com/davecgh/go-spew v1.1.1 // indirect
18-
github.com/fatih/color v1.13.0 // indirect
19-
github.com/golang/protobuf v1.5.2 // indirect
20+
github.com/fatih/color v1.16.0 // indirect
21+
github.com/golang/protobuf v1.5.4 // indirect
2022
github.com/hashicorp/errwrap v1.0.0 // indirect
2123
github.com/hashicorp/go-checkpoint v0.5.0 // indirect
2224
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
2325
github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320 // indirect
24-
github.com/hashicorp/go-hclog v1.4.0 // indirect
26+
github.com/hashicorp/go-hclog v1.5.0 // indirect
2527
github.com/hashicorp/go-multierror v1.1.1 // indirect
26-
github.com/hashicorp/go-plugin v1.4.8 // indirect
28+
github.com/hashicorp/go-plugin v1.6.1 // indirect
2729
github.com/hashicorp/go-uuid v1.0.3 // indirect
2830
github.com/hashicorp/go-version v1.6.0 // indirect
29-
github.com/hashicorp/hc-install v0.5.0 // indirect
30-
github.com/hashicorp/hcl/v2 v2.16.1 // indirect
31+
github.com/hashicorp/hc-install v0.6.4 // indirect
32+
github.com/hashicorp/hcl/v2 v2.20.1 // indirect
3133
github.com/hashicorp/logutils v1.0.0 // indirect
32-
github.com/hashicorp/terraform-exec v0.17.3 // indirect
33-
github.com/hashicorp/terraform-json v0.15.0 // indirect
34-
github.com/hashicorp/terraform-registry-address v0.1.0 // indirect
35-
github.com/hashicorp/terraform-svchost v0.0.0-20200729002733-f050f53b9734 // indirect
36-
github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d // indirect
37-
github.com/mattn/go-colorable v0.1.12 // indirect
38-
github.com/mattn/go-isatty v0.0.14 // indirect
34+
github.com/hashicorp/terraform-exec v0.21.0 // indirect
35+
github.com/hashicorp/terraform-json v0.22.1 // indirect
36+
github.com/hashicorp/terraform-registry-address v0.2.3 // indirect
37+
github.com/hashicorp/terraform-svchost v0.1.1 // indirect
38+
github.com/hashicorp/yamux v0.1.1 // indirect
39+
github.com/mattn/go-colorable v0.1.13 // indirect
40+
github.com/mattn/go-isatty v0.0.20 // indirect
3941
github.com/mitchellh/copystructure v1.2.0 // indirect
4042
github.com/mitchellh/go-testing-interface v1.14.1 // indirect
4143
github.com/mitchellh/go-wordwrap v1.0.0 // indirect
@@ -44,17 +46,19 @@ require (
4446
github.com/oklog/run v1.0.0 // indirect
4547
github.com/pmezard/go-difflib v1.0.0 // indirect
4648
github.com/vmihailenco/msgpack v4.0.4+incompatible // indirect
47-
github.com/vmihailenco/msgpack/v4 v4.3.12 // indirect
48-
github.com/vmihailenco/tagparser v0.1.1 // indirect
49-
github.com/zclconf/go-cty v1.12.1 // indirect
50-
golang.org/x/crypto v0.6.0 // indirect
51-
golang.org/x/mod v0.7.0 // indirect
52-
golang.org/x/net v0.7.0 // indirect
53-
golang.org/x/sys v0.5.0 // indirect
54-
golang.org/x/text v0.7.0 // indirect
55-
google.golang.org/appengine v1.6.6 // indirect
56-
google.golang.org/genproto v0.0.0-20200711021454-869866162049 // indirect
57-
google.golang.org/grpc v1.51.0 // indirect
58-
google.golang.org/protobuf v1.28.1 // indirect
49+
github.com/vmihailenco/msgpack/v5 v5.4.1 // indirect
50+
github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect
51+
github.com/zclconf/go-cty v1.14.4 // indirect
52+
golang.org/x/crypto v0.24.0 // indirect
53+
golang.org/x/mod v0.17.0 // indirect
54+
golang.org/x/net v0.26.0 // indirect
55+
golang.org/x/sync v0.7.0 // indirect
56+
golang.org/x/sys v0.21.0 // indirect
57+
golang.org/x/text v0.16.0 // indirect
58+
golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d // indirect
59+
google.golang.org/appengine v1.6.8 // indirect
60+
google.golang.org/genproto/googleapis/rpc v0.0.0-20240604185151-ef581f913117 // indirect
61+
google.golang.org/grpc v1.66.2 // indirect
62+
google.golang.org/protobuf v1.34.2 // indirect
5963
gopkg.in/yaml.v3 v3.0.1 // indirect
6064
)

‎go.sum

+111-237
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)
Please sign in to comment.