fix: GetService & handling missing services

This commit is contained in:
2021-12-31 12:49:31 +01:00
parent 605e2553b8
commit 95d385c420
3 changed files with 77 additions and 12 deletions

View File

@ -14,8 +14,8 @@ import (
)
// GetContainer retrieves a container. If prompt is true and the retrievd count
// of containers does not match expectedN, then a prompt is presented to let
// the user choose.
// of containers does not match 1, then a prompt is presented to let the user
// choose. A count of 0 is handled gracefully.
func GetContainer(c context.Context, cl *client.Client, filters filters.Args, prompt bool) (types.Container, error) {
containerOpts := types.ContainerListOptions{Filters: filters}
containers, err := cl.ContainerList(c, containerOpts)