Skip to content

Commit

Permalink
use envy for the env and envOr helpers
Browse files Browse the repository at this point in the history
  • Loading branch information
markbates committed Feb 28, 2018
1 parent 4a7f4b0 commit 7e56598
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions config.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import (
"github.com/gobuffalo/envy"
"github.com/pkg/errors"

"github.com/markbates/going/defaults"
"gopkg.in/yaml.v2"
)

Expand Down Expand Up @@ -74,10 +73,10 @@ func LoadFrom(r io.Reader) error {
tmpl := template.New("test")
tmpl.Funcs(map[string]interface{}{
"envOr": func(s1, s2 string) string {
return defaults.String(os.Getenv(s1), s2)
return envy.Get(s1, s2)
},
"env": func(s1 string) string {
return os.Getenv(s1)
return envy.Get(s1, "")
},
})
b, err := ioutil.ReadAll(r)
Expand Down
2 changes: 1 addition & 1 deletion soda/cmd/version.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
package cmd

const Version = "v4.0.4"
const Version = "v4.0.5"

0 comments on commit 7e56598

Please sign in to comment.