mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-07 20:30:36 -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
|
||||
func Fmt() error {
|
||||
if isGoTip() {
|
||||
return nil
|
||||
}
|
||||
pkgs, err := hugoPackages()
|
||||
if err != nil {
|
||||
return err
|
||||
|
@ -256,3 +259,7 @@ func CheckVendor() error {
|
|||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func isGoTip() bool {
|
||||
return strings.Contains(runtime.Version(), "devel")
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue