增加configutils/ParseCIDR()函数

This commit is contained in:
刘祥超
2021-08-19 10:50:40 +08:00
parent ca85f71f2b
commit 433df9dddb
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"))
}