Put the Config in a new env package [#67]

I'd like to be able to make calls like NewUpgrade(cfg) rather than
Upgrade{...}.Prepare, but I wouldn't be able to define a NewUpgrade
function while Config is in the helm package; there would be a circular
import when Plan tried to import run.
This commit is contained in:
Erin Call
2020-01-14 10:32:20 -08:00
parent 8a9cf23ab9
commit 16117eea2f
5 changed files with 38 additions and 35 deletions

View File

@@ -5,11 +5,12 @@ import (
"os"
_ "github.com/joho/godotenv/autoload"
"github.com/pelotech/drone-helm3/internal/env"
"github.com/pelotech/drone-helm3/internal/helm"
)
func main() {
cfg, err := helm.NewConfig(os.Stdout, os.Stderr)
cfg, err := env.NewConfig(os.Stdout, os.Stderr)
if err != nil {
fmt.Fprintf(os.Stderr, "%s\n", err.Error())