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

Using Viper with cobra to simplify some of the feature #20

Merged
merged 3 commits into from
Jan 12, 2023

Conversation

shinji62
Copy link
Collaborator

@shinji62 shinji62 commented Jan 11, 2023

Hi,

I have been playing with the CLI and I think I can help improving it, I joined the company in Dec. 2022 as Principal Solution Architect in Japan.

This PR will use Viper in conjunction with Cobra, which simplify how we handle the configuration file and the use of environment variable.

Used native Viper function to handle config file and environment variable
@shinji62 shinji62 changed the title Using Viper with cobra to simplify some of the feature [WIP]Using Viper with cobra to simplify some of the feature Jan 11, 2023
@shinji62 shinji62 changed the title [WIP]Using Viper with cobra to simplify some of the feature [Draft] Using Viper with cobra to simplify some of the feature Jan 11, 2023
@shinji62 shinji62 marked this pull request as draft January 11, 2023 06:47
@shinji62 shinji62 changed the title [Draft] Using Viper with cobra to simplify some of the feature Using Viper with cobra to simplify some of the feature Jan 11, 2023
@shinji62 shinji62 marked this pull request as ready for review January 11, 2023 07:55
Copy link
Collaborator

@posriniv posriniv left a comment

Choose a reason for hiding this comment

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

Looks good to me. Please make sure you test whether everything works well.

cmd/update_cluster.go Outdated Show resolved Hide resolved
Copy link
Contributor

@cdavid cdavid left a comment

Choose a reason for hiding this comment

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

Please address the comment from @posriniv . Other than that, looks awesome!

@shinji62
Copy link
Collaborator Author

Fix has been pushed thanks @posriniv and @cdavid

@shinji62 shinji62 merged commit 5d64b3d into main Jan 12, 2023
@shinji62 shinji62 deleted the feature/use_viper_add_env_var branch January 25, 2023 03:08
cdavid pushed a commit that referenced this pull request Feb 23, 2023
* Using Viper with cobra to simplify some of the feature
* Used native Viper function to handle config file and environment variable
* Added Catalin change for CDC
* Ctx fixes

Former-commit-id: 9140ef4af969ffcf515878f54bb8d98e897f6587
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.

3 participants