Skip to content

refactor: cmd package#144

Merged
nikoksr merged 12 commits intomasterfrom
refactor-cmd-package
Jul 10, 2020
Merged

refactor: cmd package#144
nikoksr merged 12 commits intomasterfrom
refactor-cmd-package

Conversation

@nikoksr
Copy link
Copy Markdown
Collaborator

@nikoksr nikoksr commented Jul 10, 2020

Summary

Simply refactor the cmd package.

Proposed Changes

  • Move most of the arg validation to cobra
  • Optimize some of the flag handlers

nikoksr added 10 commits July 9, 2020 12:04
DisableColors used to take a boolean which defined if colors should be
disabled. It was evaluated internally and colors were disabled on a
positve value (true). Now DisableColors just disables colors and the
evaluation, when colors should be disabled is left open to the calle.
Remove New* functions of custom errors. Use the bare errors instead.
Less verbose documentation and cleaner looking code.
URL returns the full url object of the attached repository.
…/gookit/color-1.2.6' into change-project-architecture
Split up big handler function in smaller sub-handlers, each dedicated to
a command flag. Evaluate the flags in a switch statement and execute
them accordingly.
Small helper functions for the flag handlers.
@nikoksr nikoksr merged commit 6cd70da into master Jul 10, 2020
@nikoksr nikoksr deleted the refactor-cmd-package branch July 10, 2020 15:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant