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()