1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
moby--moby/cli/command/secret/utils.go
Victor Vieux 8e701f0bd7 fix manpages
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-11-09 17:11:14 -08:00

20 lines
489 B
Go

package secret
import (
"github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/filters"
"github.com/docker/docker/api/types/swarm"
"github.com/docker/docker/client"
"golang.org/x/net/context"
)
func getSecretsByName(client client.APIClient, ctx context.Context, names []string) ([]swarm.Secret, error) {
args := filters.NewArgs()
for _, n := range names {
args.Add("names", n)
}
return client.SecretList(ctx, types.SecretListOptions{
Filters: args,
})
}