From b8e7f2e1339f7744bd25c0b6f275fd1e668bd1d4 Mon Sep 17 00:00:00 2001 From: Tim David Saxen Date: Thu, 29 Nov 2018 09:00:51 +0100 Subject: [PATCH] Allow multiple sub sections for tcp/udp server --- g/g.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/g/g.go b/g/g.go index 3c7385f1..e307af72 100644 --- a/g/g.go +++ b/g/g.go @@ -7,6 +7,7 @@ import ( var ( GlbClientCfg *ClientCfg GlbServerCfg *ServerCfg + GlbServerSubSectionMap map[string]*config.SubServerSectionConf ) func init() { @@ -14,8 +15,9 @@ func init() { ClientCommonConf: *config.GetDefaultClientConf(), } GlbServerCfg = &ServerCfg{ - ServerCommonConf: *config.GetDefaultServerConf(), + ServerSectionConf: *config.GetDefaultServerConf(), } + GlbServerSubSectionMap = make(map[string]*config.SubServerSectionConf) } type ClientCfg struct { @@ -26,7 +28,7 @@ type ClientCfg struct { } type ServerCfg struct { - config.ServerCommonConf + config.ServerSectionConf CfgFile string }