// Init sets consule url and path
Init sets consule url and path
// Init sets consule url and path
func (a *App) Init() error {
	viper.SetEnvPrefix("app")
	viper.BindEnv("env")
	viper.BindEnv("consul_url")
	viper.BindEnv("consul_path")
	a.consulURL = viper.GetString("consul_url")
	a.consulPath = viper.GetString("consul_path")
	if a.consulURL == "" {
		return errors.New("CONSUL_URL missing")
	}
	if a.consulPath == "" {
		return errors.New("CONSUL_PATH missing")
	}
	return nil
}
func ( a * App ) Init ( ) error { viper . SetEnvPrefix ( " " ) viper . BindEnv ( " " ) viper . BindEnv ( " " ) viper . BindEnv ( " " ) a . consulURL = viper . GetString ( " " ) a . consulPath = viper . GetString ( " " ) if a . consulURL == " " { return errors . New ( " " ) } if a . consulPath == " " { return errors . New ( " " ) } return nil }
Init sets consule url and path
Init sets consule url and path