// GetAppEnv gets the AppEnv from the environment. func GetAppEnv() (AppEnv, error) { appEnv := AppEnv{} if err := env.Populate(&appEnv); err != nil { return AppEnv{}, err } return appEnv, nil }
// GetServeEnv gets a ServeEnv using environment variables. func GetServeEnv() (ServeEnv, error) { var serveEnv ServeEnv if err := env.Populate(&serveEnv); err != nil { return ServeEnv{}, err } return serveEnv, nil }
// GetHandlerEnv gets the HandlerEnv from the environment. func GetHandlerEnv() (HandlerEnv, error) { handlerEnv := HandlerEnv{} if err := env.Populate(&handlerEnv); err != nil { return HandlerEnv{}, err } return handlerEnv, nil }
// Setup gets the Env from the environment, and then calls SetupEnv. func Setup() error { appEnv := Env{} if err := env.Populate(&appEnv); err != nil { return err } return SetupEnv(appEnv) }