Исправления в ветке main

This commit is contained in:
2025-10-28 14:33:40 +06:00
parent 5b78e775c1
commit 3c95eb85db
9 changed files with 23 additions and 11 deletions

View File

@@ -68,6 +68,15 @@ type ValidationConfig struct {
MaxExplanationLength int
}
func GetEnvBool(key string, defaultValue bool) bool {
if value, exists := os.LookupEnv(key); exists {
if boolValue, err := strconv.ParseBool(value); err == nil {
return boolValue
}
}
return defaultValue
}
func getEnv(key, defaultValue string) string {
if value, exists := os.LookupEnv(key); exists {
return value