Skip to content

Commit a88f8cb

Browse files
committed
chore: fix go version format
1 parent 3d77173 commit a88f8cb

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

pkg/golinters/gofumpt/gofumpt.go

+5-3
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import (
55
"fmt"
66
"io"
77
"os"
8+
"strings"
89
"sync"
910

1011
"github.com/shazow/go-diff/difflib"
@@ -113,10 +114,11 @@ func runGofumpt(lintCtx *linter.Context, pass *analysis.Pass, diff differ, optio
113114

114115
func getLangVersion(settings *config.GofumptSettings) string {
115116
if settings == nil || settings.LangVersion == "" {
116-
// TODO: defaults to "1.15", in the future (v2) must be set by using build.Default.ReleaseTags like staticcheck.
117-
return "1.15"
117+
// TODO: defaults to "1.15", in the future (v2) must be removed.
118+
return "go1.15"
118119
}
119-
return settings.LangVersion
120+
121+
return "go" + strings.TrimPrefix(settings.LangVersion, "go")
120122
}
121123

122124
func getIssuedTextGoFumpt(settings *config.LintersSettings) string {

0 commit comments

Comments
 (0)