Do envconfig-loading in config.go (and test it!) [#9]

This commit is contained in:
Erin Call
2019-12-23 14:44:59 -08:00
parent ef4db923cd
commit c4c136b021
3 changed files with 60 additions and 3 deletions

View File

@@ -2,7 +2,6 @@ package main
import (
"fmt"
"github.com/kelseyhightower/envconfig"
"os"
"github.com/pelotech/drone-helm3/internal/helm"
@@ -11,7 +10,7 @@ import (
func main() {
var c helm.Config
if err := envconfig.Process("plugin", &c); err != nil {
if err := c.Populate(); err != nil {
fmt.Fprintf(os.Stderr, "%s\n", err.Error())
return
}