Skip to content
This repository was archived by the owner on Nov 27, 2023. It is now read-only.

Commit 6a03c4f

Browse files
committed
Fixing linter after rebasing
Signed-off-by: Guillaume Tardif <[email protected]>
1 parent ecdc170 commit 6a03c4f

File tree

5 files changed

+15
-0
lines changed

5 files changed

+15
-0
lines changed

kube/charts/kubernetes/context.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ import (
2525
"k8s.io/client-go/tools/clientcmd"
2626
)
2727

28+
// ListAvailableKubeConfigContexts list kube contexts
2829
func ListAvailableKubeConfigContexts(kubeconfig string) ([]string, error) {
2930
config, err := clientcmd.NewDefaultPathOptions().GetStartingConfig()
3031
if err != nil {

kube/compose.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,11 @@ func (s *composeService) Start(ctx context.Context, project *types.Project, cons
8585
return errdefs.ErrNotImplemented
8686
}
8787

88+
// Stop executes the equivalent to a `compose stop`
89+
func (s *composeService) Stop(ctx context.Context, project *types.Project, consumer compose.LogConsumer) error {
90+
return errdefs.ErrNotImplemented
91+
}
92+
8893
// Logs executes the equivalent to a `compose logs`
8994
func (s *composeService) Logs(ctx context.Context, projectName string, consumer compose.LogConsumer, options compose.LogOptions) error {
9095
return errdefs.ErrNotImplemented

kube/context.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ type ContextParams struct {
3535
FromEnvironment bool
3636
}
3737

38+
// CreateContextData create Docker context data
3839
func (cp ContextParams) CreateContextData() (interface{}, string, error) {
3940
if cp.FromEnvironment {
4041
// we use the current kubectl context from a $KUBECONFIG path

local/compose/down.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,12 @@ func (s *composeService) removeContainers(ctx context.Context, w progress.Writer
113113
toDelete := container
114114
eg.Go(func() error {
115115
eventName := "Container " + getCanonicalContainerName(toDelete)
116+
w.Event(progress.StoppingEvent(eventName))
116117
err := s.stopContainers(ctx, w, []moby.Container{container})
118+
if err != nil {
119+
w.Event(progress.ErrorMessageEvent(eventName, "Error while Removing"))
120+
return err
121+
}
117122
w.Event(progress.RemovingEvent(eventName))
118123
err = s.apiClient.ContainerRemove(ctx, toDelete.ID, moby.ContainerRemoveOptions{Force: true})
119124
if err != nil {

local/compose/stop.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@ func (s *composeService) Stop(ctx context.Context, project *types.Project, consu
4848
containers = others
4949
return err
5050
})
51+
if err != nil {
52+
return err
53+
}
5154

5255
return eg.Wait()
5356
}

0 commit comments

Comments
 (0)