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

swctl: redirect output from command 'manage <Entity> create' to file #141

Merged
merged 3 commits into from
Oct 13, 2023

Conversation

Giluerre
Copy link
Collaborator

Currently configuration generated by the manage command is printed into console making it cumbersome to copy paste it into desired file (especially in --interactive mode as user cannot just redirect it > into a file).

default name of file is generated by entity name and selected format. It can be overriden by --file flag where suffix must be the same as selected format

cmd/swctl/app/cmd_manage.go Show resolved Hide resolved
cmd/swctl/app/cmd_manage.go Outdated Show resolved Hide resolved
cmd/swctl/app/cmd_manage.go Outdated Show resolved Hide resolved
cmd/swctl/app/cmd_manage.go Outdated Show resolved Hide resolved
cmd/swctl/app/cmd_manage.go Outdated Show resolved Hide resolved
- rename file flag to output-file
- added file closing
- handling filename with wrong suffix

Signed-off-by: Daniel Béreš <[email protected]>
Signed-off-by: Daniel Béreš <[email protected]>
@fgschwan fgschwan merged commit a7f3e74 into PANTHEONtech:main Oct 13, 2023
4 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.

2 participants