diff --git a/.golangci.yml b/.golangci.yml index e188272..a0fdaac 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -130,6 +130,6 @@ issues: # golangci.com configuration # https://github.com/golangci/golangci/wiki/Configuration service: - golangci-lint-version: 1.45.x # use the fixed version to not introduce new linters unexpectedly + golangci-lint-version: 1.48.x # use the fixed version to not introduce new linters unexpectedly prepare: - echo "here I can run custom commands, but no preparation needed for this repo" \ No newline at end of file diff --git a/README.md b/README.md index 470f36d..fc819f3 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,7 @@ At a minimum, the following dependencies must be installed to work with the GoLa Dependency|Minimum Version ---|--- [GoLang](https://golang.org/dl/)|1.18 -[golangci-lint](https://golangci-lint.run/usage/install/)|1.45.2 +[golangci-lint](https://golangci-lint.run/usage/install/)|1.48.0 ## Modifying the claim schema diff --git a/go.mod b/go.mod index d6f0880..d055b21 100644 --- a/go.mod +++ b/go.mod @@ -3,8 +3,9 @@ module github.com/test-network-function/test-network-function-claim go 1.18 require ( - github.com/a-h/generate v0.0.0-20190312091541-e59c34d33fb3 + github.com/a-h/generate v0.0.0-20220105161013-96c14dfdfb60 github.com/stretchr/testify v1.8.0 + golang.org/x/text v0.3.7 ) require ( diff --git a/go.sum b/go.sum index 8b2a2b1..4ebf201 100644 --- a/go.sum +++ b/go.sum @@ -1,5 +1,5 @@ -github.com/a-h/generate v0.0.0-20190312091541-e59c34d33fb3 h1:Ddgcglj3p+q6QqZ5n48lh7ZysGiKjUgdGOskKSik0xY= -github.com/a-h/generate v0.0.0-20190312091541-e59c34d33fb3/go.mod h1:traiLYQ0YD7qUMCdjo6/jSaJRPHXniX4HVs+PhEhYpc= +github.com/a-h/generate v0.0.0-20220105161013-96c14dfdfb60 h1:/rNdG6EuzjwcR1KRFpF+9qWmWh2xIcz84QOeMGr/2L8= +github.com/a-h/generate v0.0.0-20220105161013-96c14dfdfb60/go.mod h1:traiLYQ0YD7qUMCdjo6/jSaJRPHXniX4HVs+PhEhYpc= 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= @@ -10,6 +10,8 @@ github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSS github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= +golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= 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.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/internal/generate/config.go b/internal/generate/config.go index 5819b71..5f051c1 100644 --- a/internal/generate/config.go +++ b/internal/generate/config.go @@ -57,6 +57,7 @@ func GetOverrideConfig(overrideConfigFile string) (*OverrideConfig, error) { for _, pathElement := range overrideProperty.Path { runes := []rune(pathElement) if unicode.IsLower(runes[0]) { + //nolint:staticcheck overrideProperty.Path[i] = strings.Title(pathElement) } i++ diff --git a/pkg/claim/schema.go b/pkg/claim/schema.go index 260950e..d62c3dc 100644 --- a/pkg/claim/schema.go +++ b/pkg/claim/schema.go @@ -11,7 +11,7 @@ // Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // -// Code generated by `test-network-function-claim/cmd/generate/generate.go` on: 2022-07-25 10:33:11.786947 -0500 CDT m=+0.002356740 +// Code generated by `test-network-function-claim/cmd/generate/generate.go` on: 2022-08-16 13:02:12.153131 -0500 CDT m=+0.002638865 // // `https://github.com/a-h/generate` provides a generic set of interfaces to convert JSON schema into // workable GoLang struct implementations. However, the code generator is limited and does not allow @@ -28,10 +28,10 @@ package claim import ( + "bytes" "errors" "encoding/json" "fmt" - "bytes" ) // Claim