Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
UI Improvements & Refactoring
The biggest UI improvement is the use of the
prompui package
for consuming user input. It's more interactive and performs
dynamic validation.
The UI now allows the user to select the encryption type from a list
if the encryption option is invalid or an empty option is specified
with
-enc=
. As before, if no encryption option is given, it defaultsto
WPA2
and the user is not prompted for the encryption type. I've triedto make these improvements without breaking the old UI flow (yet). One
difference is invalid encryption protocols were allowed, but now they
are limited to valid types.
The
main
package has been mostly refactored. The highlights include:readability and hopefully to help accommodate future unit tests.
main
to a newrun
function that returns an exit code.(Helps with future unit tests)
version
..png
extensionThe core package now contains the type
EncryptionType
to help limitthe input into the API and make the strings consistent. This particular
implementation isn't ideal but works for now.
Minor edits made to the README, mostly to conform to
markdownlint.
Note this PR changes the API a bit, but since it's a v0.x.x series of
releases, I've assumed that's ok. The encryption protocol has changed
from a type of
string
toEncryptionProtocol
for bothNewConfig
and the
Config
struct.Unit testing will require a bit of dependency injection but before going
through that, it'll be good to see how far this PR goes since I know it's
unsolicited.