From a38c445170f49a9f7cf0334579207518486e7354 Mon Sep 17 00:00:00 2001 From: busgo Date: Wed, 31 Jul 2019 08:50:13 +0800 Subject: [PATCH] add failover --- README.md | 2 +- forest/forest.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index adefbf9..2c47e08 100644 --- a/README.md +++ b/README.md @@ -137,7 +137,7 @@ go: finding gopkg.in/yaml.v2 v2.2.1 appledeMacBook-Pro:forest apple$ ./forest -help flag needs an argument: -help Usage of ./forest: - -dbUrl string + -db-url string db url for mysql (default "root:123456@tcp(127.0.0.1:3306)/forest?charset=utf8") -etcd-dailtimeout int etcd dailtimeout (default 5) diff --git a/forest/forest.go b/forest/forest.go index 46b38a5..263a993 100644 --- a/forest/forest.go +++ b/forest/forest.go @@ -27,7 +27,7 @@ func main() { httpAddress := flag.String("http-address", DefaultHttpAddress, "http address") etcdDialTime := flag.Int64("etcd-dailtimeout", DefaultDialTimeout, "etcd dailtimeout") help := flag.String("help", "", "forest help") - dbUrl := flag.String("dbUrl", DefaultDbUrl, "db url for mysql") + dbUrl := flag.String("db-url", DefaultDbUrl, "db-url for mysql") flag.Parse() if *help != "" { flag.Usage()