Skip to content

added printHelp for issue 169#171

Merged
azimjohn merged 2 commits intoazimjohn:masterfrom
bek-shoyatbek:printHelp
Sep 18, 2023
Merged

added printHelp for issue 169#171
azimjohn merged 2 commits intoazimjohn:masterfrom
bek-shoyatbek:printHelp

Conversation

@bek-shoyatbek
Copy link
Contributor

No description provided.

@azimjohn
Copy link
Owner

@Bek-Shoyatbekov thank you for your contribution.

But it doesn't work. Because log.Fatal actually exits the program and help will never be printed.

My suggestion would be:

if len(os.Args) < 2 {
  log.Println("no command specified")
  printHelp()
  os.Exit(1)
}

@bek-shoyatbek
Copy link
Contributor Author

@azimjohn thanks for your attention....

@azimjohn azimjohn merged commit d574255 into azimjohn:master Sep 18, 2023
@azimjohn
Copy link
Owner

Awesome!

Your changes will be included in v2.2 along with other changes

@azimjohn azimjohn mentioned this pull request Sep 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants