mirror of
https://gitee.com/XM-GO/PandaX.git
synced 2026-04-29 11:51:26 +08:00
27 lines
441 B
Go
27 lines
441 B
Go
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) {
|
|
ss := strings.Trim("/0/2/6/4", "/")
|
|
|
|
split := strings.Split(ss, "/")
|
|
log.Println("split", split)
|
|
ids := DeptPCIds(split, 4, false)
|
|
t.Log(ids)
|
|
}
|