repair bugfix

This commit is contained in:
siddontang 2014-06-27 11:48:14 +08:00
parent a404ef26c0
commit 30b1a665e3
1 changed files with 6 additions and 1 deletions

View File

@ -14,7 +14,12 @@ var fileName = flag.String("config", "/etc/ledis.config", "ledisdb config file")
func main() {
flag.Parse()
data, err := ioutil.ReadFile(fileName)
if len(*fileName) == 0 {
println("need ledis config file")
return
}
data, err := ioutil.ReadFile(*fileName)
if err != nil {
println(err.Error())
return