diff --git a/plugins/config/environment.go b/plugins/config/environment.go index 1727c6342..5435e4ace 100644 --- a/plugins/config/environment.go +++ b/plugins/config/environment.go @@ -87,7 +87,7 @@ func (e *Env) Get(key string) (value string, ok bool) { return } -//GetDefault an environment variable or a default if it doesnt exist +//GetDefault an environment variable or a default if it doesn't exist func (e *Env) GetDefault(key string, defaultValue string) string { v, ok := e.env[key] if !ok { @@ -126,12 +126,12 @@ func (e *Env) Keys() (keys []string) { return } -//Len return the number of items in this environment +//Len returns the number of items in this environment func (e *Env) Len() int { return len(e.env) } -//Map return the Env as a map +//Map returns the Env as a map func (e *Env) Map() map[string]string { return e.env } @@ -140,7 +140,7 @@ func (e *Env) String() string { return e.EnvfileString() } -//Merge merges the given environment on top of the reciever +//Merge merges the given environment on top of the receiver func (e *Env) Merge(other *Env) { for _, k := range other.Keys() { e.Set(k, other.GetDefault(k, "")) @@ -196,7 +196,7 @@ func (e *Env) ShellString() string { return e.stringWithPrefixAndSeparator("", " ") } -//ExportBundle writes a tarfile of the environmnet to the given io.Writer. +//ExportBundle writes a tarfile of the environment to the given io.Writer. // for every environment variable there is a file with the variable's key // with its content set to the variable's value func (e *Env) ExportBundle(dest io.Writer) error { @@ -231,7 +231,7 @@ func (e *Env) stringWithPrefixAndSeparator(prefix string, separator string) stri } //singleQuoteEscape escapes the value as if it were shell-quoted in single quotes -func singleQuoteEscape(value string) string { // so that 'esc'apped' -> 'esc'\''aped' +func singleQuoteEscape(value string) string { // so that 'esc'aped' -> 'esc'\''aped' return strings.Replace(value, "'", "'\\''", -1) } diff --git a/plugins/config/functions b/plugins/config/functions index 9de4599c4..50fa96abc 100755 --- a/plugins/config/functions +++ b/plugins/config/functions @@ -25,7 +25,7 @@ config_export() { config_keys() { declare desc="returns keys for app or global" - config_keys "$@" + config_sub keys "$@" return 0 } @@ -40,7 +40,7 @@ config_set() { } config_unset() { - declare desc="set value of given config var" + declare desc="unset value of given config var" config_sub unset "$@" } diff --git a/plugins/config/src/subcommands/bundle/bundle.go b/plugins/config/src/subcommands/bundle/bundle.go index 3bb03a16d..e00238177 100644 --- a/plugins/config/src/subcommands/bundle/bundle.go +++ b/plugins/config/src/subcommands/bundle/bundle.go @@ -8,7 +8,7 @@ import ( ) func main() { - args := flag.NewFlagSet("config:get", flag.ExitOnError) + args := flag.NewFlagSet("config:bundle", flag.ExitOnError) global := args.Bool("global", false, "--global: use the global environment") merged := args.Bool("merged", false, "--merged: merge app environment and global environment") args.Parse(os.Args[2:]) diff --git a/plugins/config/src/subcommands/keys/keys.go b/plugins/config/src/subcommands/keys/keys.go index 64de1c02b..4f1bbbbc8 100644 --- a/plugins/config/src/subcommands/keys/keys.go +++ b/plugins/config/src/subcommands/keys/keys.go @@ -8,7 +8,7 @@ import ( ) func main() { - args := flag.NewFlagSet("config:get", flag.ExitOnError) + args := flag.NewFlagSet("config:keys", flag.ExitOnError) global := args.Bool("global", false, "--global: use the global environment") merged := args.Bool("merged", false, "--merged: merge app environment and global environment") args.Parse(os.Args[2:]) diff --git a/plugins/config/src/subcommands/set/set.go b/plugins/config/src/subcommands/set/set.go index 2bee318f7..cb6c8f4ff 100644 --- a/plugins/config/src/subcommands/set/set.go +++ b/plugins/config/src/subcommands/set/set.go @@ -7,7 +7,7 @@ import ( "github.com/dokku/dokku/plugins/config" ) -// set the given entries from the specified environment +// set the given entries to the specified environment func main() { args := flag.NewFlagSet("config:set", flag.ExitOnError) global := args.Bool("global", false, "--global: use the global environment") diff --git a/plugins/config/subcommands.go b/plugins/config/subcommands.go index a5b564933..79ef769ab 100644 --- a/plugins/config/subcommands.go +++ b/plugins/config/subcommands.go @@ -9,7 +9,7 @@ import ( "github.com/dokku/dokku/plugins/common" ) -//CommandShow implementes config:show +//CommandShow implements config:show func CommandShow(args []string, global bool, shell bool, export bool, merged bool) { appName, _ := getCommonArgs(global, args) env := getEnvironment(appName, merged)