mirror of https://github.com/ledisdb/ledisdb.git
use println instead of panic
This commit is contained in:
parent
b5400e8056
commit
4b37a88a9d
|
@ -17,18 +17,21 @@ func main() {
|
||||||
flag.Parse()
|
flag.Parse()
|
||||||
|
|
||||||
if len(*configFile) == 0 {
|
if len(*configFile) == 0 {
|
||||||
panic("must use a config file")
|
println("must use a config file")
|
||||||
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
cfg, err := server.NewConfigWithFile(*configFile)
|
cfg, err := server.NewConfigWithFile(*configFile)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err)
|
println(err.Error())
|
||||||
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
var app *server.App
|
var app *server.App
|
||||||
app, err = server.NewApp(cfg)
|
app, err = server.NewApp(cfg)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err)
|
println(err.Error())
|
||||||
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
sc := make(chan os.Signal, 1)
|
sc := make(chan os.Signal, 1)
|
||||||
|
|
Loading…
Reference in New Issue