package main import ( "os" "gopkg.in/yaml.v3" ) type Configuration struct { BaseUrl string `yaml:"baseUrl"` DebugMode bool `yaml:"debugMode"` MaxTextureSize int `yaml:"maxTextureSize"` } var config Configuration func loadConfig() error { configFile, err := os.ReadFile("config.yaml") if err != nil { return err } err = yaml.Unmarshal(configFile, &config) if err != nil { return err } return nil }