Use a go-idiomatic constructor for helm.Config [#9]

This commit is contained in:
Erin Call
2019-12-24 09:34:38 -08:00
parent 10e7e7fee5
commit 4ba1e694d9
3 changed files with 29 additions and 28 deletions

View File

@@ -8,15 +8,15 @@ import (
)
func main() {
var c helm.Config
cfg, err := helm.NewConfig()
if err := c.Populate(); err != nil {
if err != nil {
fmt.Fprintf(os.Stderr, "%s\n", err.Error())
return
}
// Make the plan
plan, err := helm.NewPlan(c)
plan, err := helm.NewPlan(*cfg)
if err != nil {
fmt.Fprintf(os.Stderr, "%w\n", err)
os.Exit(1)