Add context
This commit adds and passes context around to (almost) every function. This allows cancelling (almost) every function call globally.
This commit is contained in:
parent
996ecb9f80
commit
3455f491ca
104 changed files with 836 additions and 511 deletions
|
|
@ -29,12 +29,12 @@ func (info) Description() wisski_distillery.Description {
|
|||
}
|
||||
|
||||
func (i info) Run(context wisski_distillery.Context) error {
|
||||
instance, err := context.Environment.Instances().WissKI(i.Positionals.Slug)
|
||||
instance, err := context.Environment.Instances().WissKI(context.Context, i.Positionals.Slug)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
info, err := instance.Info().Information(false)
|
||||
info, err := instance.Info().Information(context.Context, false)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue