mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2024-05-11 05:55:12 +00:00
Switch from fmt.Error* to errors.Error* (#317)
This commit is contained in:
@@ -11,6 +11,7 @@ import (
|
||||
"strings"
|
||||
|
||||
"github.com/google/go-github/github"
|
||||
"github.com/pkg/errors"
|
||||
|
||||
"golang.org/x/oauth2"
|
||||
)
|
||||
@@ -59,7 +60,7 @@ func checkGoFmt() error {
|
||||
if fList == "" {
|
||||
return nil
|
||||
}
|
||||
return fmt.Errorf("The following files need to have gofmt run on them:\n%s", fList)
|
||||
return errors.Errorf("The following files need to have gofmt run on them:\n%s", fList)
|
||||
}
|
||||
|
||||
func checkGoGenerate() error {
|
||||
@@ -75,7 +76,7 @@ func checkGoGenerate() error {
|
||||
return err
|
||||
}
|
||||
if len(modified) != 0 {
|
||||
return fmt.Errorf("ERROR: The following files are modified after go generate:\n%s", strings.Join(modified, "\n"))
|
||||
return errors.Errorf("ERROR: The following files are modified after go generate:\n%s", strings.Join(modified, "\n"))
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user