use log.Fatal instead panic on config errors
This commit is contained in:
parent
2dc0f02d1c
commit
fce1b99683
7 changed files with 22 additions and 28 deletions
|
|
@ -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")
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue