diff --git a/envconf.go b/envconf.go index 0dd7242..3f44bde 100644 --- a/envconf.go +++ b/envconf.go @@ -147,8 +147,8 @@ func (c *Config) help() { for k, v := range c.env { if v.dtype != TypeNone { if v.hasdef { - format := fmt.Sprintf("Variable %%-%ds| Type %%-%ds| Default %%s\n", max[0]+3, max[1]+3) - fmt.Printf(format, k, v.dtype, v.defval) + format := fmt.Sprintf("Variable %%-%ds| Type %%-%ds| Default %%s\n", max[0]+5, max[1]+3) + fmt.Printf(format, strings.Sprintf(`"%s"`, k), v.dtype, strings.Sprintf(`"%s"`, v.defval)) } } } @@ -158,8 +158,8 @@ func (c *Config) help() { for k, v := range c.env { if v.dtype != TypeNone { if !v.hasdef { - format := fmt.Sprintf("Variable %%-%ds| Type %%-%ds| Required\n", max[0]+3, max[1]+3) - fmt.Printf(format, k, v.dtype) + format := fmt.Sprintf("Variable %%-%ds| Type %%-%ds| Required\n", max[0]+5, max[1]+3) + fmt.Printf(format, strings.Sprintf(`"%s"`, k), v.dtype) } } }