MCPcopy Index your code
hub / github.com/GoEdgeLab/EdgeNode / RandIP

Function RandIP

internal/utils/testutils/utils.go:22–24  ·  view source on GitHub ↗

RandIP 生成一个随机IP用于测试

()

Source from the content-addressed store, hash-verified

20
21// RandIP 生成一个随机IP用于测试
22func RandIP() string {
23 return fmt.Sprintf("%d.%d.%d.%d", rand.Int()%255, rand.Int()%255, rand.Int()%255, rand.Int()%255)
24}

Callers 7

TestNewIPList_MemoryFunction · 0.92
BenchmarkIPList_ContainsFunction · 0.92
LocalAddrMethod · 0.92
RemoteAddrMethod · 0.92

Calls

no outgoing calls

Tested by 7

TestNewIPList_MemoryFunction · 0.74
BenchmarkIPList_ContainsFunction · 0.74
LocalAddrMethod · 0.74
RemoteAddrMethod · 0.74