Skip to content

Commit 09b513e

Browse files
committed
cli/command/service: runRollback: remove intermediate vars
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
1 parent aa96cb7 commit 09b513e

1 file changed

Lines changed: 3 additions & 6 deletions

File tree

cli/command/service/rollback.go

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,9 @@ func runRollback(ctx context.Context, dockerCLI command.Cli, options *serviceOpt
4242
return err
4343
}
4444

45-
spec := &service.Spec
46-
updateOpts := types.ServiceUpdateOptions{
47-
Rollback: "previous",
48-
}
49-
50-
response, err := apiClient.ServiceUpdate(ctx, service.ID, service.Version, *spec, updateOpts)
45+
response, err := apiClient.ServiceUpdate(ctx, service.ID, service.Version, service.Spec, types.ServiceUpdateOptions{
46+
Rollback: "previous", // TODO(thaJeztah): this should have a const defined
47+
})
5148
if err != nil {
5249
return err
5350
}

0 commit comments

Comments
 (0)