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

Rework CLI interface #144

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

Conversation

grische
Copy link
Collaborator

@grische grische commented Jul 26, 2024

This reworks the CLI of the tool to allow specifiying or overriding the function parameters of the tool on the command-line.

To make this feasible, I needed named parameters for the jsonToGo() function. In order to not break existing integrations, I named the new function jsonToGov2(). This is currently fully backwards compatible (as the tests show).

@mholt What do you think about the change? Do you have a better name in mind? This is particular about the first commit 4fad829

The other commits are just improvements on the CLI, as well as a backwards-compatibility integration of v1: 0f504683d468d866c3939f2ea4358b4c2b35463f

@grische grische changed the title Rework cli interface Rework CLI interface Jul 26, 2024
@grische grische force-pushed the rework-cli-interface branch 4 times, most recently from ed1d6db to 8d6db63 Compare July 26, 2024 17:12
@grische
Copy link
Collaborator Author

grische commented Jul 26, 2024

If you prefer a single file solution (because someone has embedded this into their project using a raw GitHub link to the file), we can of course also create a wrapper function that checks if the second argument is type object and then goes the v2 route, else goes the v1 route.

Let me know what you think.

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.

1 participant