Files
docker-cli/components/engine/cli/command/secret/utils.go
yupeng 70633c7349 context.Context should be the first parameter of a function
Signed-off-by: yupeng <yu.peng36@zte.com.cn>
Upstream-commit: aff5dacec190e8d94c6b796b06c773c8b1b223fe
Component: engine
2016-11-12 14:14:34 +08:00

21 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(ctx context.Context, client client.APIClient, names []string) ([]swarm.Secret, error) {
args := filters.NewArgs()
for _, n := range names {
args.Add("names", n)
}
return client.SecretList(ctx, types.SecretListOptions{
Filters: args,
})
}