-
-
Notifications
You must be signed in to change notification settings - Fork 156
Closed
Labels
bugSomething isn't workingSomething isn't working
Milestone
Description
Describe the bug
The usage string for the cmd has hard coded version at 2.8.0, causing confusion for users.
Environment (please complete the following information):
- OS: [e.g. linux, windows, macosx]
- Database: [e.g. postgres, mysql, sqlite]
- Database driver: [e.g. pq, pgx]
- Jet version [e.g. 2.6.0 or branch name]
Code snippet
func usage() {
fmt.Println("Jet generator 2.8.0")
fmt.Println()
fmt.Println("Usage:")
order := []string{
"source", "dsn", "host", "port", "user", "password", "dbname", "schema", "params", "sslmode",
"path",
"ignore-tables", "ignore-views", "ignore-enums",
}
for _, name := range order {
flagEntry := flag.CommandLine.Lookup(name)
fmt.Printf(" -%s\n", flagEntry.Name)
fmt.Printf("\t%s\n", flagEntry.Usage)
}
fmt.Println()
fmt.Println(`Example command:
$ jet -dsn=postgresql://jet:jet@localhost:5432/jetdb?sslmode=disable -schema=dvds -path=./gen
$ jet -dsn=postgres://jet:jet@localhost:26257/jetdb?sslmode=disable -schema=dvds -path=./gen #cockroachdb
$ jet -source=postgres -dsn="user=jet password=jet host=localhost port=5432 dbname=jetdb" -schema=dvds -path=./gen
$ jet -source=mysql -host=localhost -port=3306 -user=jet -password=jet -dbname=jetdb -path=./gen
$ jet -source=sqlite -dsn="file://path/to/sqlite/database/file" -path=./gen
`)
}
Expected behavior
Usage should show the current version of the installed jet command, in my case, currently 2.10.0
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working