Skip to content

Commit 088d62b

Browse files
committed
fix linting errors
1 parent cdbc224 commit 088d62b

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

internal/cmd/volume/backup/create/create.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -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
}

internal/cmd/volume/backup/create/create_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ func TestBuildRequest(t *testing.T) {
192192

193193
for _, tt := range tests {
194194
t.Run(tt.description, func(t *testing.T) {
195-
request := buildRequest(tt.model, testClient, testCtx)
195+
request := buildRequest(testCtx, tt.model, testClient)
196196

197197
diff := cmp.Diff(request, tt.expectedRequest,
198198
cmp.AllowUnexported(tt.expectedRequest),

0 commit comments

Comments
 (0)