fix config path.

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
This commit is contained in:
Bo-Yi Wu 2016-05-02 21:13:25 +08:00
parent 5994f48e7e
commit 8bac86e2e8
1 changed files with 3 additions and 2 deletions

View File

@ -3,6 +3,7 @@ package main
import (
"flag"
"github.com/appleboy/gorush/gorush"
"github.com/appleboy/gorush/gorush/config"
"log"
)
@ -39,11 +40,11 @@ func main() {
var err error
// set default parameters.
gorush.PushConf = gorush.BuildDefaultPushConf()
gorush.PushConf = config.BuildDefaultPushConf()
// load user define config.
if *confPath != "" {
gorush.PushConf, err = gorush.LoadConfYaml(*confPath)
gorush.PushConf, err = config.LoadConfYaml(*confPath)
if err != nil {
log.Printf("Load yaml config file error: '%v'", err)