refactor: forgot there is a function in docker src
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Roxie Gibson 2021-07-22 10:19:05 +01:00
parent fe86b50ee3
commit 5e94050865
Signed by: roxxers
GPG Key ID: 5D0140EDEE123F4D
1 changed files with 2 additions and 8 deletions

View File

@ -58,17 +58,11 @@ func NewClientWithContext(contextName string) (*dClient.Client, error) {
}
func GetContext(contextName string) (dCliContextStore.Metadata, error) {
ctxs, err := NewDefaultDockerContextStore().Store.List()
ctx, err := NewDefaultDockerContextStore().GetMetadata(contextName)
if err != nil {
return dCliContextStore.Metadata{}, err
}
var context dCliContextStore.Metadata
for _, ctx := range ctxs {
if ctx.Name == contextName {
context = ctx
}
}
return context, nil
return ctx, nil
}
func GetContextEndpoint(ctx dCliContextStore.Metadata) (string, error) {