add correct example for pg's url (#857)

master
toutou_o 3 years ago committed by GitHub
parent 8270c7deed
commit a5e1d0d0dc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -456,7 +456,7 @@ var (
Flags: []cli.Flag{ Flags: []cli.Flag{
cli.StringFlag{ cli.StringFlag{
Name: "url", Name: "url",
Usage: `the data source of database,like "root:password@tcp(127.0.0.1:3306)/database`, Usage: `the data source of database,like "root:password@tcp(127.0.0.1:3306)/database"`,
}, },
cli.StringFlag{ cli.StringFlag{
Name: "table, t", Name: "table, t",
@ -497,7 +497,7 @@ var (
Flags: []cli.Flag{ Flags: []cli.Flag{
cli.StringFlag{ cli.StringFlag{
Name: "url", Name: "url",
Usage: `the data source of database,like "root:password@tcp(127.0.0.1:3306)/database`, Usage: `the data source of database,like "postgres://root:password@127.0.0.1:54332/database?sslmode=disable"`,
}, },
cli.StringFlag{ cli.StringFlag{
Name: "table, t", Name: "table, t",

@ -199,7 +199,7 @@ func fromMysqlDataSource(url, pattern, dir string, cfg *config.Config, cache, id
func fromPostgreSqlDataSource(url, pattern, dir, schema string, cfg *config.Config, cache, idea bool) error { func fromPostgreSqlDataSource(url, pattern, dir, schema string, cfg *config.Config, cache, idea bool) error {
log := console.NewConsole(idea) log := console.NewConsole(idea)
if len(url) == 0 { if len(url) == 0 {
log.Error("%v", "expected data source of mysql, but nothing found") log.Error("%v", "expected data source of postgresql, but nothing found")
return nil return nil
} }

Loading…
Cancel
Save