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

Introduced "--chain-mode" and some upgrades #4

Merged
merged 5 commits into from
Dec 24, 2021

Conversation

ItsIgnacioPortal
Copy link
Contributor

I added --chain-mode so that this project may be more easily chained with other projects, by only outputting the important things (results) when this flag is enabled.

I also added short and long forms for the usage flags. Corrected "usage" text accordingly.

I did some code cleanup and patched some bugs as well.

When no parameters were passed and stdin was empty, the program would just stall when run with "go run". This fixes that
invalid reference
Replaced double quotes with backticks, so the regexes don't have to be escaped twice, making them more readable.
comparing an array to nil is useless. it's length should be compared instead
--chain-mode was added so that this project may be more easily chained with other projects, by only outputting the important things (results) when this flag is enabled.

Also added short and long forms for the commands. To have a standardized usage text, the "usage" constant has to be written manually.

 Centralized ouput by only using three functions to output: info(), warning(), and crash(). This way, we can have color output without it being messy.
@Josue87
Copy link
Owner

Josue87 commented Dec 24, 2021

Thank you!

@Josue87 Josue87 merged commit 387844b into Josue87:main Dec 24, 2021
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