Skip to content

Commit 2534bee

Browse files
committed
docs: improve explanation of the default.
1 parent d464c12 commit 2534bee

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

.golangci.example.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@ run:
6666

6767
# Define the Go version limit.
6868
# Mainly related to generics support in go1.18.
69-
# Default: 1.17
70-
go: 1.18
69+
# Default: use Go version from the go.mod file, fallback on the env var `GOVERSION`, fallback on 1.17
70+
go: '1.18'
7171

7272

7373
# output configuration options

pkg/config/config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ func IsGreaterThanOrEqualGo118(v string) bool {
5757
func DetectGoVersion() string {
5858
file, _ := gomoddirectives.GetModuleFile()
5959

60-
if file != nil && file.Go != nil {
60+
if file != nil && file.Go != nil && file.Go.Version != "" {
6161
return file.Go.Version
6262
}
6363

0 commit comments

Comments
 (0)