cmd: no context + logging for config parsing

This commit is contained in:
Christian Schwarz
2017-09-22 14:02:07 +02:00
parent af2ff08940
commit e87ce3f7cf
5 changed files with 9 additions and 17 deletions
+1 -3
View File
@@ -66,10 +66,8 @@ func testCmdGlobalInit(cmd *cobra.Command, args []string) {
testCmdGlobal.log = log.New(os.Stdout, "", 0)
ctx := context.WithValue(context.Background(), contextKeyLog, testCmdGlobal.log)
var err error
if testCmdGlobal.conf, err = ParseConfig(ctx, rootArgs.configFile); err != nil {
if testCmdGlobal.conf, err = ParseConfig(rootArgs.configFile); err != nil {
testCmdGlobal.log.Printf("error parsing config file: %s", err)
os.Exit(1)
}