-
Notifications
You must be signed in to change notification settings - Fork 0
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
feat: Context get cmd #18
base: context
Are you sure you want to change the base?
Conversation
Signed-off-by: LeeSeolHui <[email protected]>
Signed-off-by: LeeSeolHui <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
찬영님께 코멘트한 것 처럼 app.go 의 코드를 참고하여 수정해 주시면 NewContextCommand 메소드가 너무 길어지는 것을 방지할 수 있을 것 같습니다.
cmd/argocd/commands/context.go
Outdated
@@ -96,9 +99,22 @@ argocd context cd.argoproj.io --delete`, | |||
}, | |||
} | |||
|
|||
// Get context details |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
아래와 같이 Get Command 생성부를 별도의 메소드로 분리하는 것이 좋을 것 같습니다. app.go 참고.
func NewContextGetCommand(clientOpts *argocdclient.ClientOptions) *cobra.Command {
...
}
cmd/argocd/commands/context.go
Outdated
command.AddCommand(listCommand) | ||
command.AddCommand(useCommand) | ||
command.AddCommand(deleteCommand) | ||
command.AddCommand(getDetailsCommand) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
app.go 에서처럼 AddCommand의 인자로 Get Command 생성 함수를 호출하는 방식이 좋겠습니다.
command.AddCommand(NewContextGetCommand(clientOpts))
Signed-off-by: LeeSeolHui <[email protected]>
Signed-off-by: LeeSeolHui <[email protected]>
related issue #12
Checklist: