Skip to content

Commit

Permalink
build(go.mod): upgrade go version to 1.22 (#37)
Browse files Browse the repository at this point in the history
* build(go.mod): upgrade go version to 1.22

* build(go.mod): upgrade go version to 1.22

* build(go.mod): upgrade go version to 1.22

* build(go.mod): upgrade go version to 1.22
  • Loading branch information
flc1125 authored Dec 15, 2024
1 parent cd8a2d7 commit 0b654e7
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
name: "go test"
strategy:
matrix:
go-version: [ 1.18.x, 1.19.x, 1.20.x, 1.21.x, 1.22.x, 1.23.x ]
go-version: [ 1.22.x, 1.23.x ]
platform: [ ubuntu-latest, windows-latest, macos-latest ]
runs-on: ${{ matrix.platform }}

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# 🚀 Go-Tapd-SDK

![Supported Go Versions](https://img.shields.io/badge/Go-%3E%3D1.18-blue)
![Supported Go Versions](https://img.shields.io/badge/Go-%3E%3D1.22-blue)
[![Package Version](https://badgen.net/github/release/go-tapd/tapd/stable)](https://github.com/go-tapd/tapd/releases)
[![GoDoc](https://pkg.go.dev/badge/github.com/go-tapd/tapd)](https://pkg.go.dev/github.com/go-tapd/tapd)
[![codecov](https://codecov.io/gh/go-tapd/tapd/graph/badge.svg?token=QPTHZ5L9GT)](https://codecov.io/gh/go-tapd/tapd)
Expand Down
12 changes: 6 additions & 6 deletions client_options_http_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,21 @@ func WithRetryableHTTPClientLogger(logger retryablehttp.Logger) RetryableHTTPCli
}
}

func WithRetryableHTTPClientRetryWaitMin(min time.Duration) RetryableHTTPClientOption {
func WithRetryableHTTPClientRetryWaitMin(waitMin time.Duration) RetryableHTTPClientOption {
return func(client *retryablehttp.Client) {
client.RetryWaitMin = min
client.RetryWaitMin = waitMin
}
}

func WithRetryableHTTPClientRetryWaitMax(max time.Duration) RetryableHTTPClientOption {
func WithRetryableHTTPClientRetryWaitMax(waitMax time.Duration) RetryableHTTPClientOption {
return func(client *retryablehttp.Client) {
client.RetryWaitMax = max
client.RetryWaitMax = waitMax
}
}

func WithRetryableHTTPClientRetryMax(max int) RetryableHTTPClientOption {
func WithRetryableHTTPClientRetryMax(retryMax int) RetryableHTTPClientOption {
return func(client *retryablehttp.Client) {
client.RetryMax = max
client.RetryMax = retryMax
}
}

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/go-tapd/tapd

go 1.18
go 1.22

require (
github.com/davecgh/go-spew v1.1.1
Expand Down
5 changes: 5 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,24 +1,29 @@
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/fatih/color v1.16.0 h1:zmkK9Ngbjj+K0yRhTVONQh1p/HknKYSlNT+vZCzyokM=
github.com/fatih/color v1.16.0/go.mod h1:fL2Sau1YI5c0pdGEVCbKQbLXB6edEj1ZgiY4NijnWvE=
github.com/google/go-cmp v0.5.2 h1:X2ev0eStA3AbceY54o37/0PQ/UWqKEiiO2dKL5OPaFM=
github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8=
github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU=
github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ=
github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48=
github.com/hashicorp/go-hclog v1.6.3 h1:Qr2kF+eVWjTiYmU7Y31tYlP1h0q/X3Nl3tPGdaB11/k=
github.com/hashicorp/go-hclog v1.6.3/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M=
github.com/hashicorp/go-retryablehttp v0.7.7 h1:C8hUCYzor8PIfXHa4UrZkU4VvK8o9ISHxT2Q8+VepXU=
github.com/hashicorp/go-retryablehttp v0.7.7/go.mod h1:pkQpWZeYWskR+D1tR2O5OcBFOxfA7DoAO6xtkuQnHTk=
github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA=
github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg=
github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY=
github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA=
github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
golang.org/x/sync v0.10.0 h1:3NQrjDixjgGwUOCaF8w2+VYHv0Ve/vGYSbdkTa98gmQ=
golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y=
golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
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=
Expand Down
2 changes: 1 addition & 1 deletion renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"separateMajorMinor": true,
"postUpdateOptions": ["gomodTidy"],
"constraints": {
"go": "1.18"
"go": "1.22"
},
"packageRules": [
{
Expand Down
3 changes: 0 additions & 3 deletions webhook/dispatcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ func (d *Dispatcher) RegisterBugCreateListener(listeners ...BugCreateListener) {
func (d *Dispatcher) processStoryCreate(ctx context.Context, event *StoryCreateEvent) error {
eg, ctx := errgroup.WithContext(ctx)
for _, listener := range d.storyCreateListeners {
listener := listener
eg.Go(func() error {
return listener.OnStoryCreate(ctx, event)
})
Expand All @@ -106,7 +105,6 @@ func (d *Dispatcher) processStoryCreate(ctx context.Context, event *StoryCreateE
func (d *Dispatcher) processStoryUpdate(ctx context.Context, event *StoryUpdateEvent) error {
eg, ctx := errgroup.WithContext(ctx)
for _, listener := range d.storyUpdateListeners {
listener := listener
eg.Go(func() error {
return listener.OnStoryUpdate(ctx, event)
})
Expand All @@ -117,7 +115,6 @@ func (d *Dispatcher) processStoryUpdate(ctx context.Context, event *StoryUpdateE
func (d *Dispatcher) processBugCreate(ctx context.Context, event *BugCreateEvent) error {
eg, ctx := errgroup.WithContext(ctx)
for _, listener := range d.bugCreateListeners {
listener := listener
eg.Go(func() error {
return listener.OnBugCreate(ctx, event)
})
Expand Down

0 comments on commit 0b654e7

Please sign in to comment.