@@ -54,7 +54,7 @@ func NewCmd(params *params.CmdParams) *cobra.Command {
5454 `Create a backup with labels` ,
5555 "$ stackit volume backup create --source-id xxx --source-type volume --labels key1=value1,key2=value2 --project-id xxx" ),
5656 ),
57- RunE : func (cmd * cobra.Command , args []string ) error {
57+ RunE : func (cmd * cobra.Command , _ []string ) error {
5858 ctx := context .Background ()
5959 model , err := parseInput (params .Printer , cmd )
6060 if err != nil {
@@ -100,7 +100,7 @@ func NewCmd(params *params.CmdParams) *cobra.Command {
100100 }
101101
102102 // Call API
103- req := buildRequest (model , apiClient , ctx )
103+ req := buildRequest (ctx , model , apiClient )
104104 resp , err := req .Execute ()
105105 if err != nil {
106106 return fmt .Errorf ("create volume backup: %w" , err )
@@ -182,7 +182,7 @@ func parseInput(p *print.Printer, cmd *cobra.Command) (*inputModel, error) {
182182 return & model , nil
183183}
184184
185- func buildRequest (model * inputModel , apiClient * iaas.APIClient , ctx context. Context ) iaas.ApiCreateBackupRequest {
185+ func buildRequest (ctx context. Context , model * inputModel , apiClient * iaas.APIClient ) iaas.ApiCreateBackupRequest {
186186 req := apiClient .CreateBackup (ctx , model .ProjectId )
187187 return req
188188}
0 commit comments