Skip to content

Commit e6666e5

Browse files
authored
chore: upgrade component versions (#33)
1 parent 0215933 commit e6666e5

File tree

8 files changed

+46
-28
lines changed

8 files changed

+46
-28
lines changed

.github/workflows/main.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
- name: Setup go
1919
uses: actions/setup-go@v2
2020
with:
21-
go-version: 1.17
21+
go-version: 1.19
2222

2323
- name: Checkout code
2424
uses: actions/checkout@v2
@@ -37,7 +37,7 @@ jobs:
3737
- name: Setup go
3838
uses: actions/setup-go@v2
3939
with:
40-
go-version: 1.17
40+
go-version: 1.19
4141

4242
- name: Checkout code
4343
uses: actions/checkout@v2
@@ -53,12 +53,13 @@ jobs:
5353
- name: Setup go
5454
uses: actions/setup-go@v2
5555
with:
56-
go-version: 1.17
56+
go-version: 1.19
5757

5858
- name: Checkout code
5959
uses: actions/checkout@v2
6060

6161
- name: Run golangci-lint
6262
uses: golangci/golangci-lint-action@v2
6363
with:
64-
version: v1.44.0
64+
# https://github.com/golangci/golangci-lint/releases/tag/v1.50.1
65+
version: v1.50.1

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
- name: Setup go
1616
uses: actions/setup-go@v2
1717
with:
18-
go-version: 1.17
18+
go-version: 1.19
1919

2020
- name: Checkout code
2121
uses: actions/checkout@v2

.golangci.yml

Lines changed: 25 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,38 @@
1+
issues:
2+
exclude-use-default: true
3+
exclude:
4+
# Triggered by long table tests.
5+
- Function 'Test\w+' is too long
6+
17
linters:
28
enable-all: true
39
disable:
4-
- cyclop
10+
# Linters that are deprecated.
511
- exhaustivestruct
6-
- forbidigo
12+
- scopelint
13+
- interfacer
14+
- maligned
15+
- golint
16+
- ifshort
17+
- structcheck
18+
- nosnakecase
19+
- deadcode
20+
- varcheck
21+
22+
# Linters that are disabled because of generics.
23+
- rowserrcheck
24+
- sqlclosecheck
25+
- wastedassign
26+
27+
# Linters that are not used for this project.
28+
- cyclop
29+
- exhaustruct
730
- goerr113
831
- gomnd
932
- gosec
10-
- lll
11-
- maligned
1233
- nlreturn
1334
- paralleltest
1435
- testpackage
1536
- tparallel
1637
- wrapcheck
1738
- wsl
18-
19-
issues:
20-
exclude-use-default: true
21-
exclude:
22-
# Triggered by table tests calling t.Run. See
23-
# https://github.com/kyoh86/scopelint/issues/4 for more information.
24-
- Using the variable on range scope `test` in function literal
25-
# Triggered by long table tests.
26-
- Function 'Test\w+' is too long

go.mod

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
module github.com/joshdk/retry
22

3-
go 1.17
3+
go 1.19
44

5-
require github.com/stretchr/testify v1.7.0
5+
require github.com/stretchr/testify v1.8.1
66

77
require (
88
github.com/davecgh/go-spew v1.1.1 // indirect
99
github.com/pmezard/go-difflib v1.0.0 // indirect
10-
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
10+
gopkg.in/yaml.v3 v3.0.1 // indirect
1111
)

go.sum

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,14 @@ github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs
44
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
55
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
66
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
7-
github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY=
8-
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
7+
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
8+
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
9+
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
10+
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
11+
github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk=
12+
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
913
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
1014
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
1115
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
12-
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo=
13-
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
16+
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
17+
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=

main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ func main() {
5353
func mainCmd(flags cmdFlags) error {
5454
// If the version flag (-version) was given, print the version and exit.
5555
if flags.version {
56-
fmt.Println(version)
56+
fmt.Println(version) //nolint:forbidigo
5757
return nil
5858
}
5959

retry/retry.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,8 @@ func maybeTimed(parent context.Context, timeout time.Duration) (context.Context,
137137
}
138138

139139
// jitter returns a random duration in the range of:
140-
// [0, variance)
140+
//
141+
// [0, variance)
141142
func jitter(variance time.Duration) time.Duration {
142143
if variance <= 0 {
143144
return 0

retry/task.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ type HTTPTask struct {
4141
}
4242

4343
func (t HTTPTask) Run(ctx context.Context) error {
44-
request, err := http.NewRequest("GET", t.URL, nil)
44+
request, err := http.NewRequest(http.MethodGet, t.URL, nil)
4545
if err != nil {
4646
return err
4747
}

0 commit comments

Comments
 (0)