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

refactor: pass request token as a flag instead of an argument #19

Merged
merged 1 commit into from Nov 17, 2018

Conversation

0xazure
Copy link
Owner

@0xazure 0xazure commented Nov 5, 2018

Improves the calling convention to make the data passed more explicit and help clarify usage. This also has the added benefit of improving discoverability as we can generate autocomplete help from the flag to guide the correct usage.

The calling convention was:

supernova <username> [<auth-token>]

The calling convention is now:

supernova <username> [--token <token>]

Using clap also gives us help and version commands and display for free in addition to argument parsing.

Closes #16.

Improves the calling convention to make the data passed more explicit
and help clarify usage. This also has the added benefit of improving
discoverability as we can generate autocomplete help from the flag to
guide the correct usage.

The calling convention was:

`supernova <username> [<auth-token>]`

The calling convention is now:

`supernova <username> [--token <token>]`

Using clap also gives us help and version commands and display for free
in addition to argument parsing.

Closes #16.
@0xazure
Copy link
Owner Author

0xazure commented Nov 12, 2018

/cc @seanprashad can you give me a sanity check on this changeset?

It works as intended, I'm mostly just looking for suggestions on style (particularly that last into(), I still don't know how I feel about that).

Copy link
Contributor

@seanprashad seanprashad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fine to me - as @humphd says, "Make it work then make it fast" (or cleaner in this case) 😺

@0xazure 0xazure merged commit f4838f9 into master Nov 17, 2018
@0xazure 0xazure deleted the issues/16 branch November 17, 2018 22:18
@0xazure 0xazure mentioned this pull request Nov 25, 2018
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.

None yet

2 participants