package net import ( "testing" ) func TestScan(t *testing.T) { s := ScanPort{ Host: "192.168.2.109", Timeout: 2000, Threads: 5000, } if err := s.Parse("1-65535"); err != nil { t.Error(err) } if err := s.Run(); err != nil { t.Error(err) } } func TestScanIP(t *testing.T) { s := ScanIP{ Host: "192.168.2.1", CIDR: 23, Timeout: 2000, Threads: 5000, ScanType: "icmp", WithHostname: true, } if err := s.ICMP(); err != nil { t.Error(err) } }