mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-21 20:46:30 -05:00
mage: Do not run Go Fmt check on Go tip
This commit is contained in:
parent
fdbef2a81c
commit
3153526161
1 changed files with 7 additions and 0 deletions
|
@ -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")
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue