修改配置方式,支持配置命令、环境变量、配置文件

This commit is contained in:
bjdgyc
2021-04-07 18:31:46 +08:00
parent 7fae5423b7
commit 157001be18
12 changed files with 693 additions and 200 deletions

View File

@@ -43,8 +43,8 @@ func initIpPool() {
// max := min | uint32(math.Pow(2, float64(32-one))-1)
// ip地址池
IpPool.IpLongMin = ip2long(net.ParseIP(base.Cfg.Ipv4Pool[0]))
IpPool.IpLongMax = ip2long(net.ParseIP(base.Cfg.Ipv4Pool[1]))
IpPool.IpLongMin = ip2long(net.ParseIP(base.Cfg.Ipv4Start))
IpPool.IpLongMax = ip2long(net.ParseIP(base.Cfg.Ipv4End))
}
func long2ip(i uint32) net.IP {