Skip to content

Commit

Permalink
feat: upgrade dependencies (#59)
Browse files Browse the repository at this point in the history
  • Loading branch information
hedhyw authored Oct 30, 2022
1 parent 0e6dc19 commit ca044e6
Show file tree
Hide file tree
Showing 28 changed files with 232 additions and 295 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: '1.18.4'
go-version: '1.19.2'
id: go

- name: Check out code into the Go module directory
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: '1.18.4'
go-version: '1.19.2'

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
Expand Down
3 changes: 2 additions & 1 deletion .golangci.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
"golint",
"interfacer",
"nonamedreturns",
"exhaustruct"
"exhaustruct",
"nolintlint"
]
},
"linters-settings": {
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG GOLANG_DOCKER_TAG=1.18.4-alpine3.15
ARG GOLANG_DOCKER_TAG=1.19.2-alpine3.15
ARG ALPINE_DOCKER_TAG=3.15

FROM golang:$GOLANG_DOCKER_TAG as builder
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
GOLANG_CI_LINT_VER:=v1.47.2
GOLANG_CI_LINT_VER:=v1.50.1
OUT_BIN?=${PWD}/bin/gherkingen
COVER_PACKAGES=./...
VERSION?=${shell git describe --tags}
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -253,9 +253,9 @@ There is a way to return a json representation of the root object `TemplateData`

Any field of the root object can be used directly, example: `{{ .PackageName }}`.

# golangci-lint `thelper` warning
## golangci-lint `thelper` warning

Exclude the rule for scenarios in the configuration **.golangci.yaml**:
Exclude the rule `thelper` for scenarios in the configuration **.golangci.yaml**:

```yaml
issues:
Expand Down
11 changes: 6 additions & 5 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
module github.com/hedhyw/gherkingen/v2

go 1.18
go 1.19

require (
github.com/cucumber/common/gherkin/go/v24 v24.0.0
github.com/cucumber/common/gherkin/go/v24 v24.1.0
github.com/cucumber/common/messages/go/v19 v19.1.2
github.com/google/uuid v1.3.0
github.com/hedhyw/semerr v0.4.0
github.com/hedhyw/semerr v0.5.0
github.com/iancoleman/strcase v0.2.0
github.com/stretchr/testify v1.7.5
github.com/stretchr/testify v1.8.1
)

require (
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/gofrs/uuid v4.2.0+incompatible // indirect
github.com/gofrs/uuid v4.3.0+incompatible // indirect
github.com/kr/text v0.2.0 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
24 changes: 15 additions & 9 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,29 +1,35 @@
github.com/cucumber/common/gherkin/go/v24 v24.0.0 h1:ppb74NSYmsySEbck0hpvnINHkn9PQPwyG+kK2bm3xLg=
github.com/cucumber/common/gherkin/go/v24 v24.0.0/go.mod h1:qtxmXJsRMJmRh+ZX49Ez8cYvtK1Il9E+B0YdYcPsDPg=
github.com/cucumber/common/messages/go/v19 v19.0.0/go.mod h1:O6WWH/SrhgAh1tKsKoYufycU9iTso4FSYH2xur+zruY=
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
github.com/cucumber/common/gherkin/go/v24 v24.1.0 h1:sNGx5etH6ukNlnAKuUR1nfKty9/PaUbpqGIz2Lb8/fI=
github.com/cucumber/common/gherkin/go/v24 v24.1.0/go.mod h1:AWEfZ2w9XvCzMddYwe0f8m1s1Pr5dGYs9CbRMaENuwI=
github.com/cucumber/common/messages/go/v19 v19.1.2 h1:8/ZkW9rj3KQo/regmI8kcy48tk57m427Olb7Y0lXcN4=
github.com/cucumber/common/messages/go/v19 v19.1.2/go.mod h1:0KLDvMVmmkEZcWUSKxFHSUSLS1gjujBbPN0p41IwwJ4=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
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/gofrs/uuid v4.2.0+incompatible h1:yyYWMnhkhrKwwr8gAOcOCYxOOscHgDS9yZgBrnJfGa0=
github.com/gofrs/uuid v4.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM=
github.com/gofrs/uuid v4.3.0+incompatible h1:CaSVZxm5B+7o45rtab4jC2G37WGYX1zQfuU2i6DSvnc=
github.com/gofrs/uuid v4.3.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM=
github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I=
github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/hedhyw/semerr v0.4.0 h1:uykDk9R3dAdmJ1tmcefVggH2rn2I+8zz/U6WE+0tRL4=
github.com/hedhyw/semerr v0.4.0/go.mod h1:TqywC0zWFbZprnlIXga1xHfg/ITSU7QtT/Zo4sVDTOk=
github.com/hedhyw/semerr v0.5.0 h1:TzLLGEpMOdJ2H5sU8gpyOb+Cphw5RqLiugVhb413fhM=
github.com/hedhyw/semerr v0.5.0/go.mod h1:dXid6iLS0L8x6XqXvvtNnQx5SQwY+UYeuSzhptddXlk=
github.com/iancoleman/strcase v0.2.0 h1:05I4QRnGpI0m37iZQRuskXh+w77mr6Z41lwQzuHLwW0=
github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho=
github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI=
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
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/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.7.4/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
github.com/stretchr/testify v1.7.5 h1:s5PTfem8p8EbKQOctVV53k6jCJt3UX4IEJzwh+C324Q=
github.com/stretchr/testify v1.7.5/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk=
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
5 changes: 2 additions & 3 deletions internal/app/readers.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package app
import (
"fmt"
"io"
"io/ioutil"
"os"
"strings"

Expand All @@ -26,7 +25,7 @@ func readInput(inputFile string) (data []byte, err error) {

defer func() { err = semerr.NewMultiError(err, f.Close()) }()

return ioutil.ReadAll(f)
return io.ReadAll(f)
}

func readTemplate(template string) (data []byte, err error) {
Expand All @@ -45,5 +44,5 @@ func readTemplate(template string) (data []byte, err error) {

defer func() { err = semerr.NewMultiError(err, f.Close()) }()

return ioutil.ReadAll(f)
return io.ReadAll(f)
}
4 changes: 2 additions & 2 deletions internal/assets/assets_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package assets_test

import (
"io/ioutil"
"io"
"testing"

"github.com/hedhyw/gherkingen/v2/internal/assets"
Expand Down Expand Up @@ -37,7 +37,7 @@ func TestOpenTemplate(t *testing.T) {

defer func() { assert.NoError(t, f.Close()) }()

data, err := ioutil.ReadAll(f)
data, err := io.ReadAll(f)
if assert.NoError(t, err) {
assert.NotEmpty(t, data)
}
Expand Down
2 changes: 1 addition & 1 deletion internal/docplugin/goplugin/goplugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ func (p GoPlugin) walkSlice(
return nil
}

// nolint: cyclop // Many options in switch case.
// nolint: cyclop // Many options in switch case.
func (p GoPlugin) handleStruct(
_ context.Context,
val any,
Expand Down
1 change: 1 addition & 0 deletions internal/docplugin/goplugin/gotype_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ func TestGoValue(t *testing.T) {
Exp: `100`,
ExpGoType: goTypeInt,
}, {
// nolint: dupword // False alarm.
In: `1 000 000`,
InGoType: goTypeInt,
Exp: `1000000`,
Expand Down
2 changes: 1 addition & 1 deletion internal/model/document_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"github.com/stretchr/testify/assert"
)

// nolint: gocognit,cyclop,maintidx // Unit test.
// nolint: gocognit,cyclop,maintidx // Unit test.
func TestGherkinDocumentFrom(t *testing.T) {
t.Parallel()

Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 9 additions & 1 deletion vendor/github.com/gofrs/uuid/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit ca044e6

Please sign in to comment.