Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Usage string shows hard coded version 2.8.0 #234

Closed
mrityunjaygr8 opened this issue Apr 30, 2023 · 2 comments
Closed

Usage string shows hard coded version 2.8.0 #234

mrityunjaygr8 opened this issue Apr 30, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@mrityunjaygr8
Copy link

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

@mrityunjaygr8 mrityunjaygr8 added the bug Something isn't working label Apr 30, 2023
@go-jet
Copy link
Owner

go-jet commented May 2, 2023

Hi @mrityunjaygr8, good catch.

@go-jet go-jet added this to the Version 2.10.1 milestone Jul 20, 2023
@go-jet
Copy link
Owner

go-jet commented Jul 24, 2023

Fixed with Release v2.10.1.

@go-jet go-jet closed this as completed Jul 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants