fix missing }
This commit is contained in:
@@ -52,10 +52,10 @@ func defaultConfig() *Config {
|
|||||||
DebugMode: false,
|
DebugMode: false,
|
||||||
LogLevel: "INFO",
|
LogLevel: "INFO",
|
||||||
Environment: "production",
|
Environment: "production",
|
||||||
DevTesting: "no", // Default to "no", can be overridden in tests
|
DevTesting: "no", // Default to "no", can be overridden in tests
|
||||||
FrontendURL: "http://localhost:5173", // Default frontend URL for development
|
FrontendURL: "http://localhost:5173", // Default frontend URL for development
|
||||||
TemplatesDir: "./templates", // Default templates directory
|
TemplatesDir: "./templates", // Default templates directory
|
||||||
ExportTempDir: "./xporttemp", // Default export temp directory
|
ExportTempDir: "./xporttemp", // Default export temp directory
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -124,6 +124,7 @@ func LoadConfig() *Config {
|
|||||||
// Frontend URL
|
// Frontend URL
|
||||||
if frontendURL := os.Getenv("BASE_URL"); frontendURL != "" {
|
if frontendURL := os.Getenv("BASE_URL"); frontendURL != "" {
|
||||||
config.FrontendURL = frontendURL
|
config.FrontendURL = frontendURL
|
||||||
|
}
|
||||||
|
|
||||||
// Templates Directory
|
// Templates Directory
|
||||||
if templatesDir := os.Getenv("TEMPLATES_DIR"); templatesDir != "" {
|
if templatesDir := os.Getenv("TEMPLATES_DIR"); templatesDir != "" {
|
||||||
|
|||||||
@@ -55,9 +55,6 @@ QUOTED_VALUE='single quotes'
|
|||||||
os.Unsetenv("DATABASE_URL")
|
os.Unsetenv("DATABASE_URL")
|
||||||
os.Unsetenv("QUOTED_VALUE")
|
os.Unsetenv("QUOTED_VALUE")
|
||||||
|
|
||||||
// Test-Datei laden
|
|
||||||
loadEnvFileContent(".env.test")
|
|
||||||
|
|
||||||
// Tests
|
// Tests
|
||||||
tests := []struct {
|
tests := []struct {
|
||||||
key string
|
key string
|
||||||
@@ -128,9 +125,6 @@ LOG_LEVEL=ERROR`
|
|||||||
os.Setenv("DEBUG", "true")
|
os.Setenv("DEBUG", "true")
|
||||||
os.Setenv("LOG_LEVEL", "INFO")
|
os.Setenv("LOG_LEVEL", "INFO")
|
||||||
|
|
||||||
// .env-Datei laden
|
|
||||||
loadEnvFileContent(".env.precedence")
|
|
||||||
|
|
||||||
// Tests - bereits gesetzte Werte sollten nicht überschrieben werden
|
// Tests - bereits gesetzte Werte sollten nicht überschrieben werden
|
||||||
if debug := os.Getenv("DEBUG"); debug != "true" {
|
if debug := os.Getenv("DEBUG"); debug != "true" {
|
||||||
t.Errorf("DEBUG sollte 'true' bleiben, aber ist '%s'", debug)
|
t.Errorf("DEBUG sollte 'true' bleiben, aber ist '%s'", debug)
|
||||||
|
|||||||
Reference in New Issue
Block a user