INNER CODE UNIT · Go

Load

rameshsunkara/go-rest-api-example · internal/config/config.go:36

func Load() (*ServiceEnvConfig, error) {
	dbCredentialsSideCar := os.Getenv("DBCredentialsSideCar")
	if dbCredentialsSideCar == "" {
		return nil, errors.New("database credentials sidecar file path is missing in env")
	}

	envName := os.Getenv("environment")
	if envName == "" {
		envName = DefEnvironment
	}

	port := os.Getenv("port")
	if port == "" {
		port = DefaultPort
	}

	dbHosts := os.Getenv("dbHosts")
	if dbHosts == "" {

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…