mage: Do not run Go Fmt check on Go tip

This commit is contained in:
Bjørn Erik Pedersen 2017-12-07 22:38:54 +01:00
parent fdbef2a81c
commit 3153526161
No known key found for this signature in database
GPG key ID: 330E6E2BD4859D8F

View file

@ -127,6 +127,9 @@ func TestRace() error {
// Run gofmt linter // Run gofmt linter
func Fmt() error { func Fmt() error {
if isGoTip() {
return nil
}
pkgs, err := hugoPackages() pkgs, err := hugoPackages()
if err != nil { if err != nil {
return err return err
@ -256,3 +259,7 @@ func CheckVendor() error {
} }
return nil return nil
} }
func isGoTip() bool {
return strings.Contains(runtime.Version(), "devel")
}