package config import ( "encoding/json" "os" ) type Config struct { DB_URL string `json:"db_url"` TRUSTED_PROXIES []string `json:"trusted_proxies"` OTLP_ENDPOINT string `json:"otlp_endpoint"` } func Read() *Config { file, err := os.ReadFile("/home/kocoder/src/go/shortener/settings.json") if err != nil { panic(err) } var config Config err = json.Unmarshal(file, &config) if err != nil { panic(err) } return &config }