module main import toml const ( path = './config.toml' ) struct Config { host string port int token string redirect bool redirect_url string db_path string } fn (config Config) copy() Config { return config } fn load_config() Config { config := toml.parse_file(path) or { panic(err) } return Config{ host: config.value('host').string() port: config.value('port').int() token: config.value('token').string() redirect: config.value('redirect').bool() redirect_url: config.value('redirect_url').string() db_path: config.value('db_path').string() } }