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) {
|
func GetContext(contextName string) (dCliContextStore.Metadata, error) {
|
||||||
ctxs, err := NewDefaultDockerContextStore().Store.List()
|
ctx, err := NewDefaultDockerContextStore().GetMetadata(contextName)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return dCliContextStore.Metadata{}, err
|
return dCliContextStore.Metadata{}, err
|
||||||
}
|
}
|
||||||
var context dCliContextStore.Metadata
|
return ctx, nil
|
||||||
for _, ctx := range ctxs {
|
|
||||||
if ctx.Name == contextName {
|
|
||||||
context = ctx
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return context, nil
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func GetContextEndpoint(ctx dCliContextStore.Metadata) (string, error) {
|
func GetContextEndpoint(ctx dCliContextStore.Metadata) (string, error) {
|
||||||
|
|
Reference in New Issue