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

Fix:(issue_1720) Add support for reading args from stdin #1836

Merged
merged 5 commits into from
Dec 9, 2023

Conversation

dearchap
Copy link
Contributor

@dearchap dearchap commented Dec 8, 2023

What type of PR is this?

(REQUIRED)

  • feature

What this PR does / why we need it:

(REQUIRED)

Which issue(s) this PR fixes:

(REQUIRED)

Fixes #1720

Special notes for your reviewer:

(fill-in or delete this section)

Testing

go test -run=TestCommandReadArgsFromStdIn

(fill-in or delete this section)

Release Notes

(REQUIRED)

A new field 'ReadArgsFromStdin' has been added to Command. This flag will be applicable to root command only and will allow the root command to process arguments from cmdline as well as from standard input.


@dearchap dearchap requested a review from a team as a code owner December 8, 2023 22:30
Copy link
Member

@meatballhat meatballhat left a comment

Choose a reason for hiding this comment

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

What do you think about supporting -- as the "end" of reading from stdin instead of consuming all of it?

Instead of referencing os.Stdin directly, could it use the Reader field?

Copy link

github-actions bot commented Dec 9, 2023

👍 Frogbot scanned this pull request and found that it did not add vulnerable dependencies.

Note:

Frogbot also supports Contextual Analysis, Secret Detection, IaC and SAST Vulnerabilities Scanning. This features are included as part of the JFrog Advanced Security package, which isn't enabled on your system.


@dearchap dearchap merged commit 2458b93 into urfave:main Dec 9, 2023
12 checks passed
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.

How do you set up cliv2 for command line inputs $ cli_command < input.txt > output.txt
2 participants