get.go
346 Bytes
package confapi
import (
"apigame/configs/confbase"
"errors"
)
// GetConfig 获取 api游戏配置
func GetConfig(gameId string) (conf *ApiGameConfig, err error) {
conf = new(ApiGameConfig)
has := confbase.GetConfig[*ApiGameConfig, Raw](gameId, gameId, conf)
if !has {
err = errors.New("confapi.GetConfig error")
return
}
return
}