We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 285c966 + 57fd679 commit 7853705Copy full SHA for 7853705
1 file changed
lmap.go
@@ -31,20 +31,20 @@ func main() {
31
32
func CheckIP() {
33
defer wg.Done()
34
- var use []string
35
- var notuse []string
+ var usedIP []string
+ var unusedIP []string
36
t := time.Now()
37
hosts, _ := hosts("10.150.1.1/24")
38
for _, ip := range hosts {
39
tmp := ip
40
go func(data string) {
41
bool := ping(data)
42
if bool {
43
- use = append(use, data)
44
- fmt.Println("已使用IP:", use)
+ usedIP = append(usedIP, data)
+ fmt.Println("已使用IP:", usedIP)
45
} else {
46
- notuse = append(notuse, data)
47
- fmt.Println("未使用IP:", notuse)
+ unusedIP = append(unusedIP, data)
+ fmt.Println("未使用IP:", unusedIP)
48
}
49
}(tmp)
50
0 commit comments