refactor: forgot there is a function in docker src
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
fe86b50ee3
commit
5e94050865
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue