-
-
Notifications
You must be signed in to change notification settings - Fork 4
Accept and propagate context #121
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
Changes from all commits
dc47cbd
9011697
4a2e1a8
0f73d38
90e6099
7048943
70a93e2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,6 +18,7 @@ | |
package device | ||
|
||
import ( | ||
"context" | ||
"fmt" | ||
"os" | ||
|
||
|
@@ -72,7 +73,7 @@ func runDeleteCommand(flags *deleteFlags) error { | |
params.ID = &flags.id | ||
} | ||
|
||
err = device.Delete(params, cred) | ||
err = device.Delete(context.TODO(), params, cred) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. From #112 (comment) @cmaglie
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The idea is to intercept ctrl-c only for commands that may need a cleanup. |
||
if err != nil { | ||
return err | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cmaglie any opinion on this?
Is there any alternative?