提交kit/utils

Signed-off-by: lixxxww <941403820@qq.com>
This commit is contained in:
lixxxww
2024-01-23 11:57:42 +00:00
committed by Gitee
parent c456d1249e
commit 0ff66b9d43
19 changed files with 1550 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
package utils
import (
"log"
"strings"
"testing"
)
func TestIdsStrToIdsIntGroup(t *testing.T) {
group := IdsStrToIdsIntGroup("aaa")
t.Log(len(group))
}
func TestGetRealAddressByIP(t *testing.T) {
ip := GetRealAddressByIP("10.42.0.1")
t.Log(ip)
}
func TestDeptPCIds(t *testing.T) {
split := strings.Split(strings.Trim("/0/2", "/"), "/")
log.Println("split", split)
ids := DeptPCIds(split, 2, true)
t.Log(ids)
}