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

Commit f09a573

Browse files
author
aiordache
committed
remove unused utils pkg
Signed-off-by: aiordache <[email protected]>
1 parent 1574ebd commit f09a573

File tree

6 files changed

+12
-270
lines changed

6 files changed

+12
-270
lines changed

go.mod

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ require (
4545
github.com/opencontainers/go-digest v1.0.0
4646
github.com/opencontainers/image-spec v1.0.1
4747
github.com/pkg/errors v0.9.1
48-
github.com/prometheus/common v0.10.0
4948
github.com/prometheus/tsdb v0.10.0
5049
github.com/sanathkr/go-yaml v0.0.0-20170819195128-ed9d249f429b
5150
github.com/sirupsen/logrus v1.7.0

kube/charts/charts.go

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ package charts
2020

2121
import (
2222
"context"
23+
"os"
2324
"path/filepath"
2425
"strings"
2526

@@ -28,7 +29,6 @@ import (
2829
"github.com/docker/compose-cli/api/context/store"
2930
"github.com/docker/compose-cli/kube/charts/helm"
3031
"github.com/docker/compose-cli/kube/charts/kubernetes"
31-
kubeutils "github.com/docker/compose-cli/kube/utils"
3232
chart "helm.sh/helm/v3/pkg/chart"
3333
util "helm.sh/helm/v3/pkg/chartutil"
3434
helmenv "helm.sh/helm/v3/pkg/cli"
@@ -57,7 +57,7 @@ var _ API = sdk{}
5757

5858
func NewSDK(ctx store.KubeContext) (sdk, error) {
5959
return sdk{
60-
environment: kubeutils.Environment(),
60+
environment: environment(),
6161
h: helm.NewHelmActions(nil),
6262
}, nil
6363
}
@@ -124,3 +124,13 @@ func (s sdk) GenerateChart(project *types.Project, dirname string) error {
124124
dirname = filepath.Dir(dirname)
125125
return s.SaveChart(project, dirname)
126126
}
127+
128+
func environment() map[string]string {
129+
vars := make(map[string]string)
130+
env := os.Environ()
131+
for _, v := range env {
132+
k := strings.SplitN(v, "=", 2)
133+
vars[k[0]] = k[1]
134+
}
135+
return vars
136+
}

kube/utils/config.go

Lines changed: 0 additions & 142 deletions
This file was deleted.

kube/utils/errors.go

Lines changed: 0 additions & 56 deletions
This file was deleted.

kube/utils/labels.go

Lines changed: 0 additions & 35 deletions
This file was deleted.

kube/utils/utils.go

Lines changed: 0 additions & 34 deletions
This file was deleted.

0 commit comments

Comments
 (0)