Skip to content

Commit

Permalink
add correct example for pg's url (#857)
Browse files Browse the repository at this point in the history
  • Loading branch information
kurimi1 authored Jul 30, 2021
1 parent 8270c7d commit a5e1d0d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions tools/goctl/goctl.go
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,7 @@ var (
Flags: []cli.Flag{
cli.StringFlag{
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{
Name: "table, t",
Expand Down Expand Up @@ -497,7 +497,7 @@ var (
Flags: []cli.Flag{
cli.StringFlag{
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:[email protected]:54332/database?sslmode=disable"`,
},
cli.StringFlag{
Name: "table, t",
Expand Down
2 changes: 1 addition & 1 deletion tools/goctl/model/sql/command/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
log := console.NewConsole(idea)
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
}

Expand Down

0 comments on commit a5e1d0d

Please sign in to comment.