package gmdata

// LoadServer 加载配置信息
func LoadServer(confPath string) {
	loadJsonFile(confPath+"/"+"Server_WX.json", &Servers)
}

func GetServerName(serverId int, defaultName ...string) string {
	var name = `未知`
	if len(defaultName) > 0 {
		name = defaultName[0]
	}
	for _, server := range Servers {
		if server.ServerId == serverId {
			name = server.ServerName
		}
	}

	return name
}
