use log.Fatal instead panic on config errors

This commit is contained in:
dhax 2017-10-19 00:40:25 +02:00
parent 2dc0f02d1c
commit fce1b99683
7 changed files with 22 additions and 28 deletions

View file

@ -16,6 +16,7 @@ package cmd
import (
"fmt"
"log"
"os"
homedir "github.com/mitchellh/go-homedir"
@ -76,8 +77,7 @@ func initConfig() {
// Find home directory.
home, err := homedir.Dir()
if err != nil {
fmt.Println(err)
os.Exit(1)
log.Fatal(err)
}
// Search config in home directory with name ".go-base" (without extension).