// NewConfig returns the config with the environment variables set to their
// respective fields, or defaults if not present.
NewConfig returns the config with the environment variables set to their
respective fields, or defaults if not present.
// NewConfig returns the config with the environment variables set to their // respective fields or defaults if not present .
func NewConfig() Config {
	config := Config{}
	if err := parseEnv(&config); err != nil {
		log.Fatal(err)
	}
	dir, err := homedir.Expand(config.RootDir)
	if err != nil {
		log.Fatal(err)
	}
	if err = os.MkdirAll(dir, os.FileMode(0700)); err != nil {
		log.Fatal(err)
	}
	config.RootDir = dir
	return config
}
func NewConfig ( ) Config { config := Config { } if err := parseEnv ( & config ) ; err != nil { log . Fatal ( err ) } dir , err := homedir . Expand ( config . RootDir ) if err != nil { log . Fatal ( err ) } if err = os . MkdirAll ( dir , os . FileMode ( 0700 ) ) ; err != nil { log . Fatal ( err ) } config . RootDir = dir return config }
NewConfig returns the config with the environment variables set to their
respective fields, or defaults if not present.
NewConfig returns the config with the environment variables set to their respective fields or defaults if not present .