diff options
Diffstat (limited to 'src/lib/net/port_test.go')
-rw-r--r-- | src/lib/net/port_test.go | 58 |
1 files changed, 29 insertions, 29 deletions
diff --git a/src/lib/net/port_test.go b/src/lib/net/port_test.go index f48ced075..f6123fd8d 100644 --- a/src/lib/net/port_test.go +++ b/src/lib/net/port_test.go @@ -16,37 +16,37 @@ type portTest struct { ok bool; } -var porttests = []portTest ( - portTest( "tcp", "echo", 7, true ), - portTest( "tcp", "discard", 9, true ), - portTest( "tcp", "systat", 11, true ), - portTest( "tcp", "daytime", 13, true ), - portTest( "tcp", "chargen", 19, true ), - portTest( "tcp", "ftp-data", 20, true ), - portTest( "tcp", "ftp", 21, true ), - portTest( "tcp", "ssh", 22, true ), - portTest( "tcp", "telnet", 23, true ), - portTest( "tcp", "smtp", 25, true ), - portTest( "tcp", "time", 37, true ), - portTest( "tcp", "domain", 53, true ), - portTest( "tcp", "gopher", 70, true ), - portTest( "tcp", "finger", 79, true ), - portTest( "tcp", "http", 80, true ), +var porttests = []portTest { + portTest{ "tcp", "echo", 7, true }, + portTest{ "tcp", "discard", 9, true }, + portTest{ "tcp", "systat", 11, true }, + portTest{ "tcp", "daytime", 13, true }, + portTest{ "tcp", "chargen", 19, true }, + portTest{ "tcp", "ftp-data", 20, true }, + portTest{ "tcp", "ftp", 21, true }, + portTest{ "tcp", "ssh", 22, true }, + portTest{ "tcp", "telnet", 23, true }, + portTest{ "tcp", "smtp", 25, true }, + portTest{ "tcp", "time", 37, true }, + portTest{ "tcp", "domain", 53, true }, + portTest{ "tcp", "gopher", 70, true }, + portTest{ "tcp", "finger", 79, true }, + portTest{ "tcp", "http", 80, true }, - portTest( "udp", "echo", 7, true ), - portTest( "udp", "tacacs", 49, true ), - portTest( "udp", "tftp", 69, true ), - portTest( "udp", "bootpc", 68, true ), - portTest( "udp", "bootps", 67, true ), - portTest( "udp", "domain", 53, true ), - portTest( "udp", "ntp", 123, true ), - portTest( "udp", "snmp", 161, true ), - portTest( "udp", "syslog", 514, true ), - portTest( "udp", "nfs", 2049, true ), + portTest{ "udp", "echo", 7, true }, + portTest{ "udp", "tacacs", 49, true }, + portTest{ "udp", "tftp", 69, true }, + portTest{ "udp", "bootpc", 68, true }, + portTest{ "udp", "bootps", 67, true }, + portTest{ "udp", "domain", 53, true }, + portTest{ "udp", "ntp", 123, true }, + portTest{ "udp", "snmp", 161, true }, + portTest{ "udp", "syslog", 514, true }, + portTest{ "udp", "nfs", 2049, true }, - portTest( "--badnet--", "zzz", 0, false ), - portTest( "tcp", "--badport--", 0, false ), -) + portTest{ "--badnet--", "zzz", 0, false }, + portTest{ "tcp", "--badport--", 0, false }, +} func TestLookupPort(t *testing.T) { for i := 0; i < len(porttests); i++ { |