Skip to content

Commit 0629892

Browse files
authored
Fix linter (#2327)
We need to keep the old "+build" syntax because Cobra still allows to use a Go version as old as 1.15. Signed-off-by: Marc Khouzam <[email protected]>
1 parent 7da941c commit 0629892

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

.golangci.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,3 +57,10 @@ linters:
5757
- common-false-positives
5858
- legacy
5959
- std-error-handling
60+
settings:
61+
govet:
62+
# Disable buildtag check to allow dual build tag syntax (both //go:build and // +build).
63+
# This is necessary for Go 1.15 compatibility since //go:build was introduced in Go 1.17.
64+
# This can be removed once Cobra requires Go 1.17 or higher.
65+
disable:
66+
- buildtag

0 commit comments

Comments
 (0)