func loadConfig(funcs []func() error) error {
	var err error
	for _, f := range funcs {
		err = f()
		if err != nil {
			break
		}
	}
	return err
}
LoadConfig loads all of the environment configuration specified in environment variables
package config
import (
	"errors"
	"os"
	"strconv"
	"strings"
	"time"
	"github.com/kelseyhightower/envconfig"
)
type WebConfig struct {
	ImgstoreBucketName       string        `split_words:"true"`
	ImgstoreRegion           string        `split_words:"true"`
	CsrfAuthKey              string        `split_words:"true"`
	SessionStoreKey          string        `split_words:"true"`
	RecoveryExpiry           time.Duration `split_words:"true" default:"24h"`
	DisableLocalRegistration bool          `split_words:"true"`
	FrontendIndexURL         string        `split_words:"true"`
	BackendURL               string        `split_words:"true"`
	SuccessRedirectURL       string        `split_words:"true"`
	FailureRedirectURLPrefix string        `split_words:"true"`
	Port                     int
}
type DBConfig struct {
	URI string `required:"true"`
}
type AuthConfig struct {
	Services    []string
	AuthConfigs map[string]AuthInstanceConfig
}
type AuthInstanceConfig struct {
	ClientID                       string `split_words:"true"`
	ClientSecret                   string `split_words:"true"`
	ServiceURL                     string `split_words:"true"`
	TokenURL                       string `split_words:"true"`
	Scopes                         string
	Issuer                         string `split_words:"true"`
	PassIDAndSecretForTokenAsQuery bool   `split_words:"true"`
	BackendURL                     string `split_words:"true"`
	SuccessRedirectURL             string `split_words:"true"`
	FailureRedirectURLPrefix       string `split_words:"true"`
	ProfileToShortnameField        string `split_words:"true"`
	Name                  string
	FriendlyName          string `split_words:"true"`
	ProviderURL           string `split_words:"true"`
	Type                  string
	ProfileFirstNameField string `split_words:"true"`
	ProfileLastNameField  string `split_words:"true"`
	ProfileEmailField     string `split_words:"true"`
	ProfileSlugField      string `split_words:"true"`
	RegistrationEnabled   bool   `ignored:"true"`
}
var (
	app   WebConfig
	db    DBConfig
	auth  AuthConfig
	email EmailConfig
)