Skip to content

Commit

Permalink
upgrade golang to 1.20 (#335)
Browse files Browse the repository at this point in the history
This is required before the dependency upgrade in #336 and #337
  • Loading branch information
pgier authored Jan 4, 2024
1 parent f76733f commit 2df5ee2
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 9 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:

- uses: actions/setup-go@v5
with:
go-version: '1.19'
go-version: '1.20'

- uses: hashicorp/setup-terraform@v3
with:
Expand Down Expand Up @@ -48,7 +48,7 @@ jobs:

- uses: actions/setup-go@v5
with:
go-version: '1.19'
go-version: '1.20'

- uses: actions/checkout@v4

Expand All @@ -71,7 +71,7 @@ jobs:
steps:
- uses: actions/setup-go@v5
with:
go-version: '1.18'
go-version: '1.20'

- uses: actions/checkout@v4

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:

- uses: actions/setup-go@v5
with:
go-version: 1.19
go-version: 1.20

- name: Import GPG key
id: import_gpg
Expand Down
1 change: 0 additions & 1 deletion .go-version

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ The [examples diretory](./examples) contains example configuration for the vario
### Build the provider from source
The build requires [Go](https://golang.org/doc/install) >= 1.18
The build requires [Go](https://golang.org/doc/install) >= 1.20
In order to develop and test this provider, you'll need to configure your local environment
with a custom Terraform [config file](https://developer.hashicorp.com/terraform/cli/config/config-file).
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/datastax/terraform-provider-astra/v2

go 1.18
go 1.20

require (
github.com/datastax/astra-client-go/v2 v2.2.52
Expand Down
7 changes: 5 additions & 2 deletions internal/provider/provider_framework.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,11 @@ func (p *astraProvider) Configure(ctx context.Context, req provider.ConfigureReq
if strings.HasSuffix(streamingAPIServerURL, "/") {
pulsarAdminPath = strings.TrimPrefix(pulsarAdminPath, "/")
}
// TODO: when we switch to go 1.19, this should use url.JoinPath
streamingAPIServerURLPulsarAdmin := streamingAPIServerURL + pulsarAdminPath
streamingAPIServerURLPulsarAdmin, err := url.JoinPath(streamingAPIServerURL, pulsarAdminPath)
if err != nil {
resp.Diagnostics.AddError("failed to create Pulsar admin server API URL", err.Error())
return
}
if _, err := url.Parse(streamingAPIServerURLPulsarAdmin); err != nil {
resp.Diagnostics.AddError("invalid Pulsar admin server API URL", err.Error())
return
Expand Down

0 comments on commit 2df5ee2

Please sign in to comment.