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

@ -17,6 +17,7 @@ package cmd
import (
"fmt"
"io/ioutil"
"log"
"github.com/dhax/go-base/api"
"github.com/go-chi/docgen"
@ -67,8 +68,8 @@ func genRoutesDoc() {
Intro: "GoBase REST API.",
})
if err := ioutil.WriteFile("routes.md", []byte(md), 0644); err != nil {
fmt.Print(err)
log.Println(err)
return
}
fmt.Print("OK\n")
fmt.Println("OK")
}