feat 拆出qgdzs

This commit is contained in:
2026-01-12 16:53:43 +08:00
parent a089af576c
commit 7ff0234ca6
24 changed files with 1837 additions and 0 deletions

25
config/config.go Normal file
View File

@@ -0,0 +1,25 @@
package config
import "git.hlsq.asia/mmorpg/service-common/config"
const path = "./config"
type Config struct {
App *config.AppConfig `yaml:"app"`
Log *config.LogConfig `yaml:"log"`
DB *config.DBConfig `yaml:"db"`
Serve *config.ServeConfig `yaml:"serve"`
}
var cfg *Config
// LoadConfig 加载应用配置
func LoadConfig() error {
c, err := config.LoadConfig(path, cfg)
cfg = c
return err
}
func Get() *Config {
return cfg
}