diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b7fbc08..8662c44 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -10,10 +10,10 @@ jobs: strategy: matrix: - go-version: [ "1.21", "1.22" ] + go-version: [ "1.22", "1.23" ] runs-on: ubuntu-latest env: - GOLANGCI_LINT_VERSION: v1.56.1 + GOLANGCI_LINT_VERSION: v1.61.0 steps: - name: Install Go diff --git a/.golangci.yml b/.golangci.yml index 3edf420..f623847 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -1,6 +1,6 @@ run: tests: false - deadline: 5m + timeout: 5m linters-settings: cyclop: @@ -12,26 +12,19 @@ linters-settings: linters: enable-all: true disable: - - interfacer # deprecated - - scopelint # deprecated - - maligned # deprecated - - golint # deprecated - - ifshort # deprecated - - deadcode # deprecated - - structcheck # deprecated - - nosnakecase # deprecated - - varcheck # deprecated - - exhaustivestruct # deprecated + - execinquery # deprecated + - exportloopref # deprecated + - gomnd # deprecated - depguard + - err113 - exhaustive - exhaustruct - forcetypeassert - gochecknoglobals - gochecknoinits - - goerr113 - - gomnd - interfacebloat - ireturn + - mnd - nlreturn - nonamedreturns - varnamelen diff --git a/format.go b/format.go index 3ce15df..d224e6f 100644 --- a/format.go +++ b/format.go @@ -245,7 +245,7 @@ func newColor(attr ...int) color { func (c color) Write(buf *bytes.Buffer) { buf.WriteByte('\x1b') buf.WriteByte('[') - for i := 0; i < len(c); i++ { + for i := range c { if i > 0 { buf.WriteByte(';') } diff --git a/go.mod b/go.mod index 4b79add..69d7707 100644 --- a/go.mod +++ b/go.mod @@ -1,16 +1,16 @@ module github.com/hamba/logger/v2 -go 1.21 +go 1.22 require ( github.com/go-stack/stack v1.8.1 github.com/stretchr/testify v1.9.0 - go.opentelemetry.io/otel/trace v1.29.0 + go.opentelemetry.io/otel/trace v1.30.0 ) require ( github.com/davecgh/go-spew v1.1.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - go.opentelemetry.io/otel v1.29.0 // indirect + go.opentelemetry.io/otel v1.30.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index f9fdbb6..6315ccb 100644 --- a/go.sum +++ b/go.sum @@ -8,10 +8,10 @@ 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.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= -go.opentelemetry.io/otel v1.29.0 h1:PdomN/Al4q/lN6iBJEN3AwPvUiHPMlt93c8bqTG5Llw= -go.opentelemetry.io/otel v1.29.0/go.mod h1:N/WtXPs1CNCUEx+Agz5uouwCba+i+bJGFicT8SR4NP8= -go.opentelemetry.io/otel/trace v1.29.0 h1:J/8ZNK4XgR7a21DZUAsbF8pZ5Jcw1VhACmnYt39JTi4= -go.opentelemetry.io/otel/trace v1.29.0/go.mod h1:eHl3w0sp3paPkYstJOmAimxhiFXPg+MMTlEh3nsQgWQ= +go.opentelemetry.io/otel v1.30.0 h1:F2t8sK4qf1fAmY9ua4ohFS/K+FUuOPemHUIXHtktrts= +go.opentelemetry.io/otel v1.30.0/go.mod h1:tFw4Br9b7fOS+uEao81PJjVMjW/5fvNCbpsDIXqP0pc= +go.opentelemetry.io/otel/trace v1.30.0 h1:7UBkkYzeg3C7kQX8VAidWh2biiQbtAKjyIML8dQ9wmc= +go.opentelemetry.io/otel/trace v1.30.0/go.mod h1:5EyKqTzzmyqB9bwtCCq6pDLktPK6fmGf/Dph+8VI02o= 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=