fatal method fixed

This commit is contained in:
alessio 2016-12-25 16:32:17 +01:00
parent 0937dce84c
commit 05310d8fa4
1 changed files with 3 additions and 2 deletions

View File

@ -23,8 +23,9 @@ func (s Settings) Validate(err error) error {
// Fatal prints a fatal error with its additional messages
func (s Settings) Fatal(err error, msg ...interface{}) {
if len(msg) > 0 {
if len(msg) > 0 && err != nil {
log.Fatalln(s.Red.Regular(msg...), err.Error())
} else if err != nil {
log.Fatalln(err.Error())
}
log.Fatalln(err.Error())
}