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:
@@ -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())
|
||||
|
||||
Reference in New Issue
Block a user