From 2d4e7c659463cba95323671665f3c6f6a7892107 Mon Sep 17 00:00:00 2001 From: Rafael Dantas Justo Date: Tue, 25 Feb 2025 07:49:03 -0300 Subject: [PATCH 1/2] Enhancement: Add support for generics in `goutil.TagName` Handle generic types when extracting the tag name. --- goutil/goutil.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/goutil/goutil.go b/goutil/goutil.go index 0214518..020380d 100644 --- a/goutil/goutil.go +++ b/goutil/goutil.go @@ -255,6 +255,12 @@ start: return t.Name case *ast.SelectorExpr: return t.Sel.Name + case *ast.IndexExpr: + f = t.X + goto start + case *ast.IndexListExpr: + f = t.X + goto start default: panic(fmt.Sprintf("can't get name for %#v", f)) } From 4014bfd934c7aac549b5482594b73514aa114353 Mon Sep 17 00:00:00 2001 From: Rafael Dantas Justo Date: Tue, 25 Feb 2025 08:08:48 -0300 Subject: [PATCH 2/2] Fix outdated linter configuration The `deadline` configuration was replaced by `timeout`. Also hard-coding the linter version to keep consistent checks. --- .github/workflows/build.yml | 1 + .golangci.yml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a4b28f2..9384766 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -12,6 +12,7 @@ jobs: - name: Lint uses: golangci/golangci-lint-action@v6 with: + version: v1.64 only-new-issues: true test: diff --git a/.golangci.yml b/.golangci.yml index 7edb476..0bbaa91 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -1,5 +1,5 @@ run: - deadline: 240s + timeout: 240s tests: true linters: