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

error is So dry #45

Closed
chinanf-boy opened this issue Mar 22, 2018 · 10 comments
Closed

error is So dry #45

chinanf-boy opened this issue Mar 22, 2018 · 10 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@chinanf-boy
Copy link

https://github.com/iawia002/annie/blob/master/main.go#L34

	if len(args) < 1 {
		fmt.Println("error") // so dry
		return
	}

may be you could Add same like annie -h etc, not just error

@iawia002
Copy link
Owner

Nice catch! This is the code that was written at the beginning of this project and I forgot to update it when I finished the basic functions

@iawia002 iawia002 added the enhancement New feature or request label Mar 22, 2018
@arpit1997
Copy link
Contributor

@iawia002 Can I work on this issue?

@iawia002
Copy link
Owner

@arpit1997 Sure! About the error message, you got any suggestion?

@iawia002 iawia002 added the good first issue Good for newcomers label Mar 22, 2018
@arpit1997
Copy link
Contributor

@iawia002, In general, we show error (too few/many args) and the help that how to use and supported args. We can do same for this also

@iawia002
Copy link
Owner

@arpit1997 how about

too few args to call Annie

Use "annie -h" for more information

@arpit1997
Copy link
Contributor

@iawia002, Can we just show them the help here itself? Because user have to type annie -h to see available commands. If he/she did enter too few/many args then we should show them the help directly.

@iawia002
Copy link
Owner

@arpit1997 cool!

too few args to call Annie

Usage of annie:
...

@arpit1997
Copy link
Contributor

Will be doing the above. Will submit a PR by tonight. @iawia002

@iawia002
Copy link
Owner

@arpit1997 cool, thanks!

@chinanf-boy
Copy link
Author

#49 ok!
seem like that error message is 可以的

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants