diff --git a/go.mod b/go.mod index dc176d93de413..0644405fd6d8a 100644 --- a/go.mod +++ b/go.mod @@ -78,7 +78,7 @@ require ( github.com/opentracing-contrib/go-grpc v0.1.2 // indirect github.com/opentracing-contrib/go-stdlib v1.1.0 // indirect github.com/opentracing/opentracing-go v1.2.1-0.20220228012449-10b1cf09e00b // indirect - github.com/oschwald/geoip2-golang v1.11.0 + github.com/oschwald/geoip2-golang v1.13.0 // github.com/pierrec/lz4 v2.0.5+incompatible github.com/pierrec/lz4/v4 v4.1.22 github.com/pkg/errors v0.9.1 diff --git a/go.sum b/go.sum index 27007ff64164e..6b80b78d54bbd 100644 --- a/go.sum +++ b/go.sum @@ -1033,8 +1033,8 @@ github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnh github.com/oracle/oci-go-sdk/v65 v65.41.1 h1:+lbosOyNiib3TGJDvLq1HwEAuFqkOjPJDIkyxM15WdQ= github.com/oracle/oci-go-sdk/v65 v65.41.1/go.mod h1:MXMLMzHnnd9wlpgadPkdlkZ9YrwQmCOmbX5kjVEJodw= github.com/orisano/pixelmatch v0.0.0-20220722002657-fb0b55479cde/go.mod h1:nZgzbfBr3hhjoZnS66nKrHmduYNpc34ny7RK4z5/HM0= -github.com/oschwald/geoip2-golang v1.11.0 h1:hNENhCn1Uyzhf9PTmquXENiWS6AlxAEnBII6r8krA3w= -github.com/oschwald/geoip2-golang v1.11.0/go.mod h1:P9zG+54KPEFOliZ29i7SeYZ/GM6tfEL+rgSn03hYuUo= +github.com/oschwald/geoip2-golang v1.13.0 h1:Q44/Ldc703pasJeP5V9+aFSZFmBN7DKHbNsSFzQATJI= +github.com/oschwald/geoip2-golang v1.13.0/go.mod h1:P9zG+54KPEFOliZ29i7SeYZ/GM6tfEL+rgSn03hYuUo= github.com/oschwald/maxminddb-golang v1.13.0 h1:R8xBorY71s84yO06NgTmQvqvTvlS/bnYZrrWX1MElnU= github.com/oschwald/maxminddb-golang v1.13.0/go.mod h1:BU0z8BfFVhi1LQaonTwwGQlsHUEu9pWNdMfmq4ztm0o= github.com/ovh/go-ovh v1.8.0 h1:eQ5TAAFZvZAVarQir62oaTL+8a503pIBuOWVn72iGtY= diff --git a/vendor/github.com/oschwald/geoip2-golang/.golangci.toml b/vendor/github.com/oschwald/geoip2-golang/.golangci.toml deleted file mode 100644 index 799416c53a9ff..0000000000000 --- a/vendor/github.com/oschwald/geoip2-golang/.golangci.toml +++ /dev/null @@ -1,192 +0,0 @@ -[run] -# This is needed for precious, which may run multiple instances -# in parallel -allow-parallel-runners = true -go = "1.21" -tests = true -timeout = "10m" - -[linters] -enable-all = true -disable = [ - "cyclop", - "depguard", - "err113", - "execinquery", - "exhaustive", - "exhaustruct", - "forcetypeassert", - "funlen", - "gochecknoglobals", - "godox", - "gomnd", - "inamedparam", - "interfacebloat", - "mnd", - "nlreturn", - "nonamedreturns", - "paralleltest", - "thelper", - "testpackage", - - "varnamelen", - "wrapcheck", - "wsl", - - # Require Go 1.22 - "copyloopvar", - "intrange", -] - -[linters-settings.errorlint] -errorf = true -asserts = true -comparison = true - -[linters-settings.exhaustive] -default-signifies-exhaustive = true - -[linters-settings.forbidigo] -# Forbid the following identifiers -forbid = [ - { p = "Geoip", msg = "you should use `GeoIP`" }, - { p = "geoIP", msg = "you should use `geoip`" }, - { p = "Maxmind", msg = "you should use `MaxMind`" }, - { p = "^maxMind", msg = "you should use `maxmind`" }, - { p = "Minfraud", msg = "you should use `MinFraud`" }, - { p = "^minFraud", msg = "you should use `minfraud`" }, - { p = "^math.Max$", msg = "you should use the max built-in instead." }, - { p = "^math.Min$", msg = "you should use the min built-in instead." }, - { p = "^os.IsNotExist", msg = "As per their docs, new code should use errors.Is(err, fs.ErrNotExist)." }, - { p = "^os.IsExist", msg = "As per their docs, new code should use errors.Is(err, fs.ErrExist)" }, -] - -[linters-settings.gci] -sections = ["standard", "default", "prefix(github.com/oschwald/maxminddb-golang)"] - -[linters-settings.gofumpt] -extra-rules = true - -[linters-settings.govet] -enable-all = true -disable = "shadow" - -[linters-settings.lll] -line-length = 120 -tab-width = 4 - -[linters-settings.misspell] -locale = "US" - -[[linters-settings.misspell.extra-words]] -typo = "marshall" -correction = "marshal" - -[[linters-settings.misspell.extra-words]] -typo = "marshalling" -correction = "marshaling" - -[[linters-settings.misspell.extra-words]] -typo = "marshalls" -correction = "marshals" - -[[linters-settings.misspell.extra-words]] -typo = "unmarshall" -correction = "unmarshal" - -[[linters-settings.misspell.extra-words]] -typo = "unmarshalling" -correction = "unmarshaling" - -[[linters-settings.misspell.extra-words]] -typo = "unmarshalls" -correction = "unmarshals" - -[linters-settings.nolintlint] -allow-unused = false -allow-no-explanation = ["lll", "misspell"] -require-explanation = true -require-specific = true - -[linters-settings.revive] -enable-all-rules = true -ignore-generated-header = true -severity = "warning" - -[[linters-settings.revive.rules]] -name = "add-constant" -disabled = true - -[[linters-settings.revive.rules]] -name = "cognitive-complexity" -disabled = true - -[[linters-settings.revive.rules]] -name = "confusing-naming" -disabled = true - -[[linters-settings.revive.rules]] -name = "confusing-results" -disabled = true - -[[linters-settings.revive.rules]] -name = "cyclomatic" -disabled = true - -[[linters-settings.revive.rules]] -name = "deep-exit" -disabled = true - -[[linters-settings.revive.rules]] -name = "flag-parameter" -disabled = true - -[[linters-settings.revive.rules]] -name = "function-length" -disabled = true - -[[linters-settings.revive.rules]] -name = "function-result-limit" -disabled = true - -[[linters-settings.revive.rules]] -name = "line-length-limit" -disabled = true - -[[linters-settings.revive.rules]] -name = "max-public-structs" -disabled = true - -[[linters-settings.revive.rules]] -name = "nested-structs" -disabled = true - -[[linters-settings.revive.rules]] -name = "unchecked-type-assertion" -disabled = true - -[[linters-settings.revive.rules]] -name = "unhandled-error" -disabled = true - -[linters-settings.tagliatelle.case.rules] -avro = "snake" -bson = "snake" -env = "upperSnake" -envconfig = "upperSnake" -json = "snake" -mapstructure = "snake" -xml = "snake" -yaml = "snake" - -[linters-settings.unparam] -check-exported = true - - -[[issues.exclude-rules]] -linters = [ - "govet", - "revive", -] -path = "_test.go" -text = "fieldalignment:" diff --git a/vendor/github.com/oschwald/geoip2-golang/.golangci.yml b/vendor/github.com/oschwald/geoip2-golang/.golangci.yml new file mode 100644 index 0000000000000..eacb7dfed9005 --- /dev/null +++ b/vendor/github.com/oschwald/geoip2-golang/.golangci.yml @@ -0,0 +1,177 @@ +version: "2" +run: + go: "1.24" + tests: true + allow-parallel-runners: true +linters: + default: all + disable: + - cyclop + - depguard + - err113 + - exhaustive + - exhaustruct + - forcetypeassert + - funlen + - gochecknoglobals + - gocognit + - godox + - gosmopolitan + - inamedparam + - interfacebloat + - mnd + - nlreturn + - nonamedreturns + - paralleltest + # Seems to conflict with golines or one of the formatters. + - tagalign + - testpackage + - thelper + - varnamelen + - wrapcheck + - wsl + - wsl_v5 + settings: + errorlint: + errorf: true + asserts: true + comparison: true + exhaustive: + default-signifies-exhaustive: true + forbidigo: + forbid: + - pattern: Geoip + msg: you should use `GeoIP` + - pattern: geoIP + msg: you should use `geoip` + - pattern: Maxmind + msg: you should use `MaxMind` + - pattern: ^maxMind + msg: you should use `maxmind` + - pattern: Minfraud + msg: you should use `MinFraud` + - pattern: ^minFraud + msg: you should use `minfraud` + - pattern: ^math.Max$ + msg: you should use the max built-in instead. + - pattern: ^math.Min$ + msg: you should use the min built-in instead. + - pattern: ^os.IsNotExist + msg: As per their docs, new code should use errors.Is(err, fs.ErrNotExist). + - pattern: ^os.IsExist + msg: As per their docs, new code should use errors.Is(err, fs.ErrExist) + gosec: + excludes: + - G115 + govet: + disable: + - shadow + enable-all: true + lll: + line-length: 120 + tab-width: 4 + misspell: + locale: US + extra-words: + - typo: marshall + correction: marshal + - typo: marshalling + correction: marshaling + - typo: marshalls + correction: marshals + - typo: unmarshall + correction: unmarshal + - typo: unmarshalling + correction: unmarshaling + - typo: unmarshalls + correction: unmarshals + nolintlint: + require-explanation: true + require-specific: true + allow-no-explanation: + - lll + - misspell + allow-unused: false + revive: + severity: warning + enable-all-rules: true + rules: + - name: add-constant + disabled: true + - name: cognitive-complexity + disabled: true + - name: confusing-naming + disabled: true + - name: confusing-results + disabled: true + - name: cyclomatic + disabled: true + - name: deep-exit + disabled: true + - name: flag-parameter + disabled: true + - name: function-length + disabled: true + - name: function-result-limit + disabled: true + - name: line-length-limit + disabled: true + - name: max-public-structs + disabled: true + - name: nested-structs + disabled: true + - name: unchecked-type-assertion + disabled: true + - name: unhandled-error + disabled: true + tagliatelle: + case: + rules: + avro: snake + bson: snake + env: upperSnake + envconfig: upperSnake + json: snake + mapstructure: snake + xml: snake + yaml: snake + unparam: + check-exported: true + exclusions: + generated: lax + presets: + - comments + - common-false-positives + - legacy + - std-error-handling + rules: + - linters: + - govet + - revive + path: _test.go + text: 'fieldalignment:' + paths: + - third_party$ + - builtin$ + - examples$ +formatters: + enable: + - gci + - gofmt + - gofumpt + - goimports + - golines + settings: + gci: + sections: + - standard + - default + - prefix(github.com/oschwald/geoip2-golang) + gofumpt: + extra-rules: true + exclusions: + generated: lax + paths: + - third_party$ + - builtin$ + - examples$ diff --git a/vendor/github.com/oschwald/geoip2-golang/reader.go b/vendor/github.com/oschwald/geoip2-golang/reader.go index 7e9e0a64286d2..28e16955939fa 100644 --- a/vendor/github.com/oschwald/geoip2-golang/reader.go +++ b/vendor/github.com/oschwald/geoip2-golang/reader.go @@ -290,6 +290,7 @@ func getDBType(reader *maxminddb.Reader) (databaseType, error) { "DBIP-Country", "DBIP-Location (compat=City)", "GeoLite2-City", + "GeoIP-City-Redacted-US", "GeoIP2-City", "GeoIP2-City-Africa", "GeoIP2-City-Asia-Pacific", @@ -306,6 +307,7 @@ func getDBType(reader *maxminddb.Reader) (databaseType, error) { return isDomain, nil case "DBIP-ISP (compat=Enterprise)", "DBIP-Location-ISP (compat=Enterprise)", + "GeoIP-Enterprise-Redacted-US", "GeoIP2-Enterprise": return isEnterprise | isCity | isCountry, nil case "GeoIP2-ISP", "GeoIP2-Precision-ISP": diff --git a/vendor/modules.txt b/vendor/modules.txt index f9b6b3f49f3ed..ff26562ab2e9c 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -1553,7 +1553,7 @@ github.com/opentracing-contrib/go-stdlib/nethttp github.com/opentracing/opentracing-go github.com/opentracing/opentracing-go/ext github.com/opentracing/opentracing-go/log -# github.com/oschwald/geoip2-golang v1.11.0 +# github.com/oschwald/geoip2-golang v1.13.0 ## explicit; go 1.21 github.com/oschwald/geoip2-golang # github.com/oschwald/maxminddb-golang v1.13.0