This repository has been archived on 2026-01-07. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
Game/Server/robot/config/config.go

28 lines
479 B
Go

package config
import "common/config"
const path = "./config"
type Config struct {
App *config.AppConfig `yaml:"app"`
Log *config.LogConfig `yaml:"log"`
Client *struct {
UID []int32 `yaml:"uid"`
Websocket *config.AddressConfig `yaml:"websocket"`
} `yaml:"client"`
}
var cfg *Config
// LoadConfig 加载应用配置
func LoadConfig() error {
c, err := config.LoadConfig(path, cfg)
cfg = c
return err
}
func Get() *Config {
return cfg
}