增加configutils/ParseCIDR()函数

This commit is contained in:
GoEdgeLab
2021-08-19 10:50:40 +08:00
parent 5b93ce48f9
commit 3e16c95951
2 changed files with 33 additions and 0 deletions

View File

@@ -0,0 +1,11 @@
// Copyright 2021 Liuxiangchao iwind.liu@gmail.com. All rights reserved.
package configutils
import "testing"
func TestParseCIDR(t *testing.T) {
t.Log(ParseCIDR("192.168.1.1/32"))
t.Log(ParseCIDR("192.168.1.1/24"))
t.Log(ParseCIDR("192.168.1.1/16"))
}