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:
@@ -41,7 +41,7 @@ func parseargs(args []string) (zonename string, filename string, r io.Reader, er
|
||||
// Anything else returns an error.
|
||||
|
||||
if len(args) < 2 {
|
||||
return "", "", nil, fmt.Errorf("no command line parameters. Zone name required")
|
||||
return "", "", nil, errors.Errorf("no command line parameters. Zone name required")
|
||||
}
|
||||
|
||||
zonename = args[0]
|
||||
@@ -56,7 +56,7 @@ func parseargs(args []string) (zonename string, filename string, r io.Reader, er
|
||||
return "", "", nil, errors.Wrapf(err, "Could not open file: %s", filename)
|
||||
}
|
||||
} else {
|
||||
return "", "", nil, fmt.Errorf("too many command line parameters")
|
||||
return "", "", nil, errors.Errorf("too many command line parameters")
|
||||
}
|
||||
|
||||
return zonename, filename, r, nil
|
||||
|
||||
Reference in New Issue
Block a user