should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...)

Signed-off-by: yupengzte <yu.peng36@zte.com.cn>
This commit is contained in:
yupengzte
2017-03-06 09:14:48 +08:00
parent df70b30e59
commit 363f321f32
4 changed files with 4 additions and 5 deletions

View File

@@ -82,7 +82,7 @@ func check(options ...string) []error {
errs = appendNotNil(errs, kernel())
default:
fmt.Printf("Unrecognized option %s", c)
errs = append(errs, errors.New(fmt.Sprintf("Unrecognized option %s", c)))
errs = append(errs, fmt.Errorf("Unrecognized option %s", c))
}
}
return errs