@@ -22,15 +22,15 @@ import (
2222)
2323
2424const (
25- runnerIdArg = "RUNNER_ID"
26- forceFlag = "force"
25+ runnerIdArg = "RUNNER_ID"
26+ forceDeleteFlag = "force"
2727)
2828
2929// inputModel struct holds all the input parameters for the command
3030type inputModel struct {
3131 * globalflags.GlobalFlagModel
32- RunnerId string
33- Force bool
32+ RunnerId string
33+ ForceDelete bool
3434}
3535
3636// NewCmd creates a new cobra command for deleting an Intake Runner
@@ -62,7 +62,7 @@ func NewCmd(p *types.CmdParams) *cobra.Command {
6262 }
6363
6464 prompt := fmt .Sprintf ("Are you sure you want to delete Intake Runner %q?" , model .RunnerId )
65- if model .Force {
65+ if model .ForceDelete {
6666 prompt = fmt .Sprintf ("%s This will also remove all Intakes and Intake Users that would stop the removal of the Intake" , prompt )
6767 }
6868 err = p .Printer .PromptForConfirmation (prompt )
@@ -101,7 +101,7 @@ func NewCmd(p *types.CmdParams) *cobra.Command {
101101}
102102
103103func configureFlags (cmd * cobra.Command ) {
104- cmd .Flags ().Bool (forceFlag , false , "When true, also removes all associated Intakes and Intake Users that would stop the removal of the Intake" )
104+ cmd .Flags ().Bool (forceDeleteFlag , false , "When true, also removes all associated Intakes and Intake Users that would stop the removal of the Intake" )
105105}
106106
107107// parseInput parses the command arguments and flags into a standardized model
@@ -116,7 +116,7 @@ func parseInput(p *print.Printer, cmd *cobra.Command, inputArgs []string) (*inpu
116116 model := inputModel {
117117 GlobalFlagModel : globalFlags ,
118118 RunnerId : runnerId ,
119- Force : flags .FlagToBoolValue (p , cmd , forceFlag ),
119+ ForceDelete : flags .FlagToBoolValue (p , cmd , forceDeleteFlag ),
120120 }
121121
122122 p .DebugInputModel (model )
@@ -126,7 +126,7 @@ func parseInput(p *print.Printer, cmd *cobra.Command, inputArgs []string) (*inpu
126126// buildRequest creates the API request to delete an Intake Runner
127127func buildRequest (ctx context.Context , model * inputModel , apiClient * intake.APIClient ) intake.ApiDeleteIntakeRunnerRequest {
128128 req := apiClient .DefaultAPI .DeleteIntakeRunner (ctx , model .ProjectId , model .Region , model .RunnerId )
129- if model .Force {
129+ if model .ForceDelete {
130130 return req .Force (true )
131131 }
132132 return req
0 commit comments