refactor: use cli context vs creating new one
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
@ -1,7 +1,6 @@
|
||||
package app
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
@ -23,7 +22,6 @@ var appPsCommand = &cli.Command{
|
||||
Action: func(c *cli.Context) error {
|
||||
app := internal.ValidateApp(c)
|
||||
|
||||
ctx := context.Background()
|
||||
cl, err := client.New(app.Server)
|
||||
if err != nil {
|
||||
logrus.Fatal(err)
|
||||
@ -32,7 +30,7 @@ var appPsCommand = &cli.Command{
|
||||
filters := filters.NewArgs()
|
||||
filters.Add("name", app.StackName())
|
||||
|
||||
containers, err := cl.ContainerList(ctx, types.ContainerListOptions{Filters: filters})
|
||||
containers, err := cl.ContainerList(c.Context, types.ContainerListOptions{Filters: filters})
|
||||
if err != nil {
|
||||
logrus.Fatal(err)
|
||||
}
|
||||
|
Reference in New Issue
Block a user