mirror of https://github.com/restic/restic.git
errors: Add "Fatal" prefix for Fatalf()
This commit is contained in:
parent
92316a9853
commit
032621289b
|
@ -34,5 +34,5 @@ func Fatal(s string) error {
|
||||||
|
|
||||||
// Fatalf returns an error which implements the Fataler interface.
|
// Fatalf returns an error which implements the Fataler interface.
|
||||||
func Fatalf(s string, data ...interface{}) error {
|
func Fatalf(s string, data ...interface{}) error {
|
||||||
return fatalError(fmt.Sprintf(s, data...))
|
return Wrap(fatalError(fmt.Sprintf(s, data...)), "Fatal")
|
||||||
}
|
}
|
||||||
|
|
|
@ -65,11 +65,11 @@ var invalidOptsTests = []struct {
|
||||||
}{
|
}{
|
||||||
{
|
{
|
||||||
[]string{"=bar", "bar=baz", "k="},
|
[]string{"=bar", "bar=baz", "k="},
|
||||||
"empty key is not a valid option",
|
"Fatal: empty key is not a valid option",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
[]string{"x=1", "foo=bar", "y=2", "foo=baz"},
|
[]string{"x=1", "foo=bar", "y=2", "foo=baz"},
|
||||||
`key "foo" present more than once`,
|
`Fatal: key "foo" present more than once`,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -185,7 +185,7 @@ var invalidSetTests = []struct {
|
||||||
"first_name": "foobar",
|
"first_name": "foobar",
|
||||||
},
|
},
|
||||||
"ns",
|
"ns",
|
||||||
"option ns.first_name is not known",
|
"Fatal: option ns.first_name is not known",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Options{
|
Options{
|
||||||
|
|
Loading…
Reference in New Issue