remove obsolete subprojects

(cherry picked from commit e219932b17bf2b9776141828b3212ed210ffa251)
This commit is contained in:
2026-01-25 20:26:10 +01:00
parent 44fac3f471
commit a196f25526
587 changed files with 0 additions and 31031 deletions
-48
View File
@@ -1,48 +0,0 @@
package config
import "os"
// AppConfig is the Application configuration struct
type AppConfig struct {
Name string
Version string
Token string
}
// HTTPConfig is the Application HTTP configuration
type HTTPConfig struct {
Content string
Problem string
Port string
}
// Config is the Configuration struct
type Config struct {
App AppConfig
HTTP HTTPConfig
}
// New returns a new Config Struct
func New() *Config {
return &Config{
App: AppConfig{
Name: env("APP_NAME", "Kontor"),
Version: env("APP_VERSION", "v1.0"),
Token: env("APP_TOKEN", ""),
},
HTTP: HTTPConfig{
Content: env("HTTP_CONTENT_TYPE", "application/json"),
Problem: env("HTTP_PROBLEM", "application/problem+json"),
Port: env("HTTP_PORT", ":8086"),
},
}
}
// env is a simple helper function to read an environment variable or return a default value
func env(key string, defaultValue string) string {
if value, exists := os.LookupEnv(key); exists {
return value
}
return defaultValue
}