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

upgrade go version to 1.21 #306

Merged
merged 3 commits into from
Dec 29, 2023
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
7 changes: 6 additions & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,12 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v4.1.1
uses: actions/checkout@v4

- name: Install Go
uses: actions/setup-go@v4
with:
go-version-file: go.mod

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
Expand Down
29 changes: 29 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,35 @@
# Release (Unreleased)

* `github.com/patrickcping/pingone-go-sdk-v2` : v0.11.4
* **Note** Upgrade GO to `v1.21` [#306](https://github.com/patrickcping/pingone-go-sdk-v2/pull/306)
* **Enhancement** Add ability to append custom user-agent information to HTTP requests. [#305](https://github.com/patrickcping/pingone-go-sdk-v2/pull/305)
* `github.com/patrickcping/pingone-go-sdk-v2/agreementmanagement` : [v0.3.1](./agreementmanagement/CHANGELOG.md)
* **Note** Upgrade GO to `v1.21` [#306](https://github.com/patrickcping/pingone-go-sdk-v2/pull/306)
* **Note** Updated the default UserAgent string format. [#305](https://github.com/patrickcping/pingone-go-sdk-v2/pull/305)
* **Enhancement** Add ability to append custom user-agent information to HTTP requests. [#305](https://github.com/patrickcping/pingone-go-sdk-v2/pull/305)
* `github.com/patrickcping/pingone-go-sdk-v2/authorize` : [v0.4.1](./authorize/CHANGELOG.md)
* **Note** Upgrade GO to `v1.21` [#306](https://github.com/patrickcping/pingone-go-sdk-v2/pull/306)
* **Note** Updated the default UserAgent string format. [#305](https://github.com/patrickcping/pingone-go-sdk-v2/pull/305)
* **Enhancement** Add ability to append custom user-agent information to HTTP requests. [#305](https://github.com/patrickcping/pingone-go-sdk-v2/pull/305)
* `github.com/patrickcping/pingone-go-sdk-v2/credentials` : [v0.6.2](./credentials/CHANGELOG.md)
* **Note** Upgrade GO to `v1.21` [#306](https://github.com/patrickcping/pingone-go-sdk-v2/pull/306)
* **Note** Updated the default UserAgent string format. [#305](https://github.com/patrickcping/pingone-go-sdk-v2/pull/305)
* **Enhancement** Add ability to append custom user-agent information to HTTP requests. [#305](https://github.com/patrickcping/pingone-go-sdk-v2/pull/305)
* `github.com/patrickcping/pingone-go-sdk-v2/management` : [v0.34.1](./management/CHANGELOG.md)
* **Note** Upgrade GO to `v1.21` [#306](https://github.com/patrickcping/pingone-go-sdk-v2/pull/306)
* **Note** Updated the default UserAgent string format. [#305](https://github.com/patrickcping/pingone-go-sdk-v2/pull/305)
* **Enhancement** Add ability to append custom user-agent information to HTTP requests. [#305](https://github.com/patrickcping/pingone-go-sdk-v2/pull/305)
* `github.com/patrickcping/pingone-go-sdk-v2/mfa` : [v0.18.3](./mfa/CHANGELOG.md)
* **Note** Upgrade GO to `v1.21` [#306](https://github.com/patrickcping/pingone-go-sdk-v2/pull/306)
* **Note** Updated the default UserAgent string format. [#305](https://github.com/patrickcping/pingone-go-sdk-v2/pull/305)
* **Enhancement** Add ability to append custom user-agent information to HTTP requests. [#305](https://github.com/patrickcping/pingone-go-sdk-v2/pull/305)
* `github.com/patrickcping/pingone-go-sdk-v2/risk` : [v0.12.2](./risk/CHANGELOG.md)
* **Note** Upgrade GO to `v1.21` [#306](https://github.com/patrickcping/pingone-go-sdk-v2/pull/306)
* **Note** Updated the default UserAgent string format. [#305](https://github.com/patrickcping/pingone-go-sdk-v2/pull/305)
* **Enhancement** Add ability to append custom user-agent information to HTTP requests. [#305](https://github.com/patrickcping/pingone-go-sdk-v2/pull/305)
* `github.com/patrickcping/pingone-go-sdk-v2/verify` : [v0.4.1](./verify/CHANGELOG.md)
* **Note** Upgrade GO to `v1.21` [#306](https://github.com/patrickcping/pingone-go-sdk-v2/pull/306)
* **Note** Updated the default UserAgent string format. [#305](https://github.com/patrickcping/pingone-go-sdk-v2/pull/305)
* **Enhancement** Add ability to append custom user-agent information to HTTP requests. [#305](https://github.com/patrickcping/pingone-go-sdk-v2/pull/305)

# Release (2023-12-27)
Expand Down
1 change: 1 addition & 0 deletions agreementmanagement/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# v0.3.1 (Unreleased)

* **Note** Upgrade GO to `v1.21` [#306](https://github.com/patrickcping/pingone-go-sdk-v2/pull/306)
* **Note** Updated the default UserAgent string format. [#305](https://github.com/patrickcping/pingone-go-sdk-v2/pull/305)
* **Enhancement** Add ability to append custom user-agent information to HTTP requests. [#305](https://github.com/patrickcping/pingone-go-sdk-v2/pull/305)

Expand Down
3 changes: 1 addition & 2 deletions agreementmanagement/client_ext.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,10 @@ import (
"net/http"
"reflect"
"regexp"
"slices"
"strconv"
"strings"
"time"

"golang.org/x/exp/slices"
)

type SDKInterfaceFunc func() (any, *http.Response, error)
Expand Down
4 changes: 1 addition & 3 deletions agreementmanagement/go.mod
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
module github.com/patrickcping/pingone-go-sdk-v2/agreementmanagement

go 1.18

require golang.org/x/exp v0.0.0-20231226003508-02704c960a9b
go 1.21
2 changes: 0 additions & 2 deletions agreementmanagement/go.sum
Original file line number Diff line number Diff line change
@@ -1,2 +0,0 @@
golang.org/x/exp v0.0.0-20231226003508-02704c960a9b h1:kLiC65FbiHWFAOu+lxwNPujcsl8VYyTYYEZnsOO1WK4=
golang.org/x/exp v0.0.0-20231226003508-02704c960a9b/go.mod h1:iRJReGqOEeBhDZGkGbynYwcHlctCvnjTYIamk7uXpHI=
1 change: 1 addition & 0 deletions authorize/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# v0.4.1 (Unreleased)

* **Note** Upgrade GO to `v1.21` [#306](https://github.com/patrickcping/pingone-go-sdk-v2/pull/306)
* **Note** Updated the default UserAgent string format. [#305](https://github.com/patrickcping/pingone-go-sdk-v2/pull/305)
* **Enhancement** Add ability to append custom user-agent information to HTTP requests. [#305](https://github.com/patrickcping/pingone-go-sdk-v2/pull/305)

Expand Down
3 changes: 1 addition & 2 deletions authorize/client_ext.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,10 @@ import (
"net/http"
"reflect"
"regexp"
"slices"
"strconv"
"strings"
"time"

"golang.org/x/exp/slices"
)

type SDKInterfaceFunc func() (any, *http.Response, error)
Expand Down
4 changes: 1 addition & 3 deletions authorize/go.mod
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
module github.com/patrickcping/pingone-go-sdk-v2/authorize

go 1.18

require golang.org/x/exp v0.0.0-20231226003508-02704c960a9b
go 1.21
2 changes: 0 additions & 2 deletions authorize/go.sum
Original file line number Diff line number Diff line change
@@ -1,2 +0,0 @@
golang.org/x/exp v0.0.0-20231226003508-02704c960a9b h1:kLiC65FbiHWFAOu+lxwNPujcsl8VYyTYYEZnsOO1WK4=
golang.org/x/exp v0.0.0-20231226003508-02704c960a9b/go.mod h1:iRJReGqOEeBhDZGkGbynYwcHlctCvnjTYIamk7uXpHI=
1 change: 1 addition & 0 deletions credentials/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# v0.6.2 (Unreleased)

* **Note** Upgrade GO to `v1.21` [#306](https://github.com/patrickcping/pingone-go-sdk-v2/pull/306)
* **Note** Updated the default UserAgent string format. [#305](https://github.com/patrickcping/pingone-go-sdk-v2/pull/305)
* **Enhancement** Add ability to append custom user-agent information to HTTP requests. [#305](https://github.com/patrickcping/pingone-go-sdk-v2/pull/305)

Expand Down
3 changes: 1 addition & 2 deletions credentials/client_ext.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,10 @@ import (
"net/http"
"reflect"
"regexp"
"slices"
"strconv"
"strings"
"time"

"golang.org/x/exp/slices"
)

type SDKInterfaceFunc func() (any, *http.Response, error)
Expand Down
7 changes: 2 additions & 5 deletions credentials/go.mod
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
module github.com/patrickcping/pingone-go-sdk-v2/credentials

go 1.18
go 1.21

require (
github.com/stretchr/testify v1.8.4
golang.org/x/exp v0.0.0-20231226003508-02704c960a9b
)
require github.com/stretchr/testify v1.8.4

require (
github.com/davecgh/go-spew v1.1.1 // indirect
Expand Down
2 changes: 0 additions & 2 deletions credentials/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
golang.org/x/exp v0.0.0-20231226003508-02704c960a9b h1:kLiC65FbiHWFAOu+lxwNPujcsl8VYyTYYEZnsOO1WK4=
golang.org/x/exp v0.0.0-20231226003508-02704c960a9b/go.mod h1:iRJReGqOEeBhDZGkGbynYwcHlctCvnjTYIamk7uXpHI=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/patrickcping/pingone-go-sdk-v2

go 1.20
go 1.21

require (
github.com/patrickcping/pingone-go-sdk-v2/agreementmanagement v0.3.0
Expand All @@ -10,12 +10,12 @@ require (
github.com/patrickcping/pingone-go-sdk-v2/mfa v0.18.2
github.com/patrickcping/pingone-go-sdk-v2/risk v0.12.1
github.com/patrickcping/pingone-go-sdk-v2/verify v0.4.0
golang.org/x/exp v0.0.0-20231226003508-02704c960a9b
golang.org/x/oauth2 v0.15.0
)

require (
github.com/golang/protobuf v1.5.3 // indirect
golang.org/x/exp v0.0.0-20231226003508-02704c960a9b // indirect
golang.org/x/net v0.19.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/protobuf v1.31.0 // indirect
Expand Down
1 change: 1 addition & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg
github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/patrickcping/pingone-go-sdk-v2/agreementmanagement v0.3.0 h1:1q0mSmaqukeieFXy2uYB4DDVTE0Jl6/+DIvxwrLIjBI=
github.com/patrickcping/pingone-go-sdk-v2/agreementmanagement v0.3.0/go.mod h1:tq8S1tyW9yYipql5KFhdEWmMZo8rMbkVAmVJ8/TcB7M=
github.com/patrickcping/pingone-go-sdk-v2/authorize v0.4.0 h1:OwtWDa+HIblEH1sHSqK6m73XWMlc7O3OMLvPrl5zJLk=
Expand Down
2 changes: 1 addition & 1 deletion go.work
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
go 1.20
go 1.21

use (
./
Expand Down
1 change: 1 addition & 0 deletions management/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# v0.34.1 (Unreleased)

* **Note** Upgrade GO to `v1.21` [#306](https://github.com/patrickcping/pingone-go-sdk-v2/pull/306)
* **Note** Updated the default UserAgent string format. [#305](https://github.com/patrickcping/pingone-go-sdk-v2/pull/305)
* **Enhancement** Add ability to append custom user-agent information to HTTP requests. [#305](https://github.com/patrickcping/pingone-go-sdk-v2/pull/305)

Expand Down
3 changes: 1 addition & 2 deletions management/client_ext.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,10 @@ import (
"net/http"
"reflect"
"regexp"
"slices"
"strconv"
"strings"
"time"

"golang.org/x/exp/slices"
)

type SDKInterfaceFunc func() (any, *http.Response, error)
Expand Down
4 changes: 1 addition & 3 deletions management/go.mod
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
module github.com/patrickcping/pingone-go-sdk-v2/management

go 1.18

require golang.org/x/exp v0.0.0-20231226003508-02704c960a9b
go 1.21
2 changes: 0 additions & 2 deletions management/go.sum
Original file line number Diff line number Diff line change
@@ -1,2 +0,0 @@
golang.org/x/exp v0.0.0-20231226003508-02704c960a9b h1:kLiC65FbiHWFAOu+lxwNPujcsl8VYyTYYEZnsOO1WK4=
golang.org/x/exp v0.0.0-20231226003508-02704c960a9b/go.mod h1:iRJReGqOEeBhDZGkGbynYwcHlctCvnjTYIamk7uXpHI=
1 change: 1 addition & 0 deletions mfa/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# v0.18.3 (Unreleased)

* **Note** Upgrade GO to `v1.21` [#306](https://github.com/patrickcping/pingone-go-sdk-v2/pull/306)
* **Note** Updated the default UserAgent string format. [#305](https://github.com/patrickcping/pingone-go-sdk-v2/pull/305)
* **Enhancement** Add ability to append custom user-agent information to HTTP requests. [#305](https://github.com/patrickcping/pingone-go-sdk-v2/pull/305)

Expand Down
3 changes: 1 addition & 2 deletions mfa/client_ext.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,10 @@ import (
"net/http"
"reflect"
"regexp"
"slices"
"strconv"
"strings"
"time"

"golang.org/x/exp/slices"
)

type SDKInterfaceFunc func() (any, *http.Response, error)
Expand Down
4 changes: 1 addition & 3 deletions mfa/go.mod
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
module github.com/patrickcping/pingone-go-sdk-v2/mfa

go 1.18

require golang.org/x/exp v0.0.0-20231226003508-02704c960a9b
go 1.21
2 changes: 0 additions & 2 deletions mfa/go.sum
Original file line number Diff line number Diff line change
@@ -1,2 +0,0 @@
golang.org/x/exp v0.0.0-20231226003508-02704c960a9b h1:kLiC65FbiHWFAOu+lxwNPujcsl8VYyTYYEZnsOO1WK4=
golang.org/x/exp v0.0.0-20231226003508-02704c960a9b/go.mod h1:iRJReGqOEeBhDZGkGbynYwcHlctCvnjTYIamk7uXpHI=
2 changes: 1 addition & 1 deletion pingone/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import (
"fmt"
"os"
"regexp"
"slices"
"strings"

"github.com/patrickcping/pingone-go-sdk-v2/pingone/model"
"golang.org/x/exp/slices"
"golang.org/x/oauth2"
)

Expand Down
2 changes: 1 addition & 1 deletion pingone/model/product.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ package model

import (
"fmt"
"slices"
"sort"

"github.com/patrickcping/pingone-go-sdk-v2/management"
"golang.org/x/exp/slices"
)

type ProductMapping struct {
Expand Down
3 changes: 1 addition & 2 deletions pingone/model/region.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@ package model

import (
"log"
"slices"
"sort"

"golang.org/x/exp/slices"

"github.com/patrickcping/pingone-go-sdk-v2/management"
)

Expand Down
1 change: 1 addition & 0 deletions risk/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# v0.12.2 (Unreleased)

* **Note** Upgrade GO to `v1.21` [#306](https://github.com/patrickcping/pingone-go-sdk-v2/pull/306)
* **Note** Updated the default UserAgent string format. [#305](https://github.com/patrickcping/pingone-go-sdk-v2/pull/305)
* **Enhancement** Add ability to append custom user-agent information to HTTP requests. [#305](https://github.com/patrickcping/pingone-go-sdk-v2/pull/305)

Expand Down
3 changes: 1 addition & 2 deletions risk/client_ext.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,10 @@ import (
"net/http"
"reflect"
"regexp"
"slices"
"strconv"
"strings"
"time"

"golang.org/x/exp/slices"
)

type SDKInterfaceFunc func() (any, *http.Response, error)
Expand Down
4 changes: 1 addition & 3 deletions risk/go.mod
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
module github.com/patrickcping/pingone-go-sdk-v2/risk

go 1.18

require golang.org/x/exp v0.0.0-20231226003508-02704c960a9b
go 1.21
2 changes: 0 additions & 2 deletions risk/go.sum
Original file line number Diff line number Diff line change
@@ -1,2 +0,0 @@
golang.org/x/exp v0.0.0-20231226003508-02704c960a9b h1:kLiC65FbiHWFAOu+lxwNPujcsl8VYyTYYEZnsOO1WK4=
golang.org/x/exp v0.0.0-20231226003508-02704c960a9b/go.mod h1:iRJReGqOEeBhDZGkGbynYwcHlctCvnjTYIamk7uXpHI=
3 changes: 1 addition & 2 deletions scripts/client_ext.go.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,10 @@ import (
"net/http"
"reflect"
"regexp"
"slices"
"strconv"
"strings"
"time"

"golang.org/x/exp/slices"
)

type SDKInterfaceFunc func() (any, *http.Response, error)
Expand Down
7 changes: 4 additions & 3 deletions scripts/generate-module.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@ else
echo "==> Running codegen-$3..."
openapi-generator-cli version-manager set 7.0.1
openapi-generator-cli generate -i generate/pingone-$3.yml -g go --additional-properties=packageName=$3,packageVersion=$version,isGoSubmodule=true,enumClassPrefix=true,apiNameSuffix=Api -o . --git-repo-id $2 --git-user-id $1 --http-user-agent \"pingtools PingOne-GOLANG-SDK-$3/$version\"; \
go get -u ./...
go mod tidy
go mod vendor

echo "==> Copying custom templated files..."
template=$(cat ../scripts/client_ext.go.tmpl)
Expand All @@ -28,6 +25,10 @@ else
echo "==> Applying module specific postprocessing..."
go run generate/postprocessing/generate-replace-regex.go .

go get -u ./...
go mod tidy
go mod vendor

else \
echo "pingone-$3.yml missing. Skipping"; \
fi
Expand Down
6 changes: 6 additions & 0 deletions scripts/generate-replace-regex.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,12 @@ var (
repl string
}{

{
fileSelectPattern: "go.mod",
pattern: `go 1.18`,
repl: `go 1.21`,
},

/////////////////////////
// ALL configuration.go
/////////////////////////
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/patrickcping/pingone-go-sdk-v2/tools

go 1.20
go 1.21

require (
github.com/golangci/golangci-lint v1.55.1
Expand Down
Loading
Loading