fix: more precise filtering
All checks were successful
continuous-integration/drone/push Build is passing

Closes coop-cloud/organising#305.
This commit is contained in:
2022-03-27 12:40:05 +02:00
committed by Gitea
parent 338360096c
commit 6aa23a76a1
10 changed files with 70 additions and 25 deletions

View File

@ -7,15 +7,12 @@ import (
"github.com/docker/docker/api/types/filters"
)
func GetVolumes(ctx context.Context, server string, appName string) ([]*types.Volume, error) {
func GetVolumes(ctx context.Context, server string, fs filters.Args) ([]*types.Volume, error) {
cl, err := New(server)
if err != nil {
return nil, err
}
fs := filters.NewArgs()
fs.Add("name", appName)
volumeListOKBody, err := cl.VolumeList(ctx, fs)
volumeList := volumeListOKBody.Volumes
if err != nil {