[config] move to godotenv

This commit is contained in:
Alex Quick
2017-05-20 14:38:27 -04:00
parent 08aa2b9fa4
commit eeb6e78fa4
30 changed files with 1189 additions and 362 deletions

View File

@@ -7,9 +7,7 @@ import (
"strconv"
"strings"
common "github.com/dokku/dokku/plugins/common"
"github.com/dokku/dokku/plugins/config"
configenv "github.com/dokku/dokku/plugins/config/src/configenv"
columnize "github.com/ryanuber/columnize"
)
@@ -26,6 +24,8 @@ Additional commands:`
config:set (<app>|--global) [--encoded] [--no-restart] KEY1=VALUE1 [KEY2=VALUE2 ...], Set one or more config vars
config:unset (<app>|--global) KEY1 [KEY2 ...], Unset one or more config vars
config:export (<app>|--global) [--envfile], Export a global or app environment
config:keys (<app> | --global) [--merged], Show keys set in environment
config:bundle (<app> | --global) [--merged], Bundle environment into tarfile
`
)
@@ -37,16 +37,8 @@ func main() {
switch cmd {
case "config", "config:show":
target := flag.Arg(1)
if target == "" {
usage()
common.LogFail("Please specify an app or --global")
}
env, err := configenv.NewFromTarget(target)
if err != nil {
common.LogFail(err.Error())
} else {
fmt.Println(config.PrettyPrintLogEntries("", env.Map()))
}
env := config.GetConfig(target, false)
fmt.Print(config.PrettyPrintEnvEntries("", env.Map()))
case "config:help":
usage()
case "help":