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 tink-client gRPC flags for get and delete command #441

Merged
merged 2 commits into from
Feb 25, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions cmd/tink-cli/cmd/delete/delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,6 @@ func NewDeleteCommand(opt Options) *cobra.Command {
if opt.fullClient != nil {
return nil
}
if opt.clientConnOpt == nil {
opt.SetClientConnOpt(&client.ConnOptions{})
}
opt.clientConnOpt.SetFlags(cmd.PersistentFlags())
return nil
},
PreRunE: func(cmd *cobra.Command, args []string) error {
Expand Down Expand Up @@ -119,5 +115,9 @@ func NewDeleteCommand(opt Options) *cobra.Command {
return nil
},
}
if opt.clientConnOpt == nil {
opt.SetClientConnOpt(&client.ConnOptions{})
}
opt.clientConnOpt.SetFlags(cmd.PersistentFlags())
return cmd
}
8 changes: 4 additions & 4 deletions cmd/tink-cli/cmd/get/get.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,6 @@ func NewGetCommand(opt Options) *cobra.Command {
if opt.fullClient != nil {
return nil
}
if opt.clientConnOpt == nil {
opt.SetClientConnOpt(&client.ConnOptions{})
}
opt.clientConnOpt.SetFlags(cmd.PersistentFlags())
return nil
},
PreRunE: func(cmd *cobra.Command, args []string) error {
Expand Down Expand Up @@ -153,5 +149,9 @@ func NewGetCommand(opt Options) *cobra.Command {
}
cmd.PersistentFlags().StringVarP(&opt.Format, "format", "", "table", "The format you expect the list to be printed out. Currently supported format are table, JSON and CSV")
cmd.PersistentFlags().BoolVar(&opt.NoHeaders, "no-headers", false, "Table contains an header with the columns' name. You can disable it from being printed out")
if opt.clientConnOpt == nil {
opt.SetClientConnOpt(&client.ConnOptions{})
}
opt.clientConnOpt.SetFlags(cmd.PersistentFlags())
return cmd
}