1
0
mirror of https://github.com/golang/go synced 2024-11-12 13:20:31 -07:00
go/src/net
Marvin Stenger f22ba1f247 all: prefer strings.IndexByte over strings.Index
strings.IndexByte was introduced in go1.2 and it can be used
effectively wherever the second argument to strings.Index is
exactly one byte long.

This avoids generating unnecessary string symbols and saves
a few calls to strings.Index.

Change-Id: I1ab5edb7c4ee9058084cfa57cbcc267c2597e793
Reviewed-on: https://go-review.googlesource.com/65930
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2017-09-25 17:35:41 +00:00
..
http all: prefer strings.IndexByte over strings.Index 2017-09-25 17:35:41 +00:00
internal/socktest all: remove unnecessary ", _" from map reads 2017-04-18 15:29:10 +00:00
mail net/mail: skip trailing comment while parsing email 2017-09-24 23:26:13 +00:00
rpc net/rpc: use a sync.Map for serviceMap instead of RWMutex 2017-04-28 20:42:11 +00:00
smtp all: remove the the duplicate words 2017-03-06 04:39:12 +00:00
testdata
textproto
url all: prefer strings.IndexByte over strings.Index 2017-09-25 17:35:41 +00:00
addrselect_test.go
addrselect.go
cgo_android.go
cgo_bsd.go
cgo_linux.go
cgo_netbsd.go
cgo_openbsd.go
cgo_resnew.go
cgo_resold.go
cgo_socknew.go
cgo_sockold.go
cgo_solaris.go
cgo_stub.go
cgo_unix_test.go
cgo_unix.go {net,os/user,plugin}: eliminate unnecessary C round-trips 2017-08-17 18:14:16 +00:00
cgo_windows.go
conf_netcgo.go
conf_test.go
conf.go
conn_test.go
dial_test.go net: don't run TestDialListenerAddr in short mode on non-builders 2017-06-09 22:15:01 +00:00
dial_unix_test.go
dial.go net: update documentation on Listen and ListenPacket 2017-06-22 08:31:13 +00:00
dnsclient_test.go
dnsclient_unix_test.go net: support all PacketConn and Conn returned by Resolver.Dial 2017-06-08 21:53:49 +00:00
dnsclient_unix.go net: support all PacketConn and Conn returned by Resolver.Dial 2017-06-08 21:53:49 +00:00
dnsclient.go
dnsconfig_unix_test.go
dnsconfig_unix.go
dnsmsg_test.go
dnsmsg.go
dnsname_test.go
error_plan9_test.go
error_posix_test.go
error_posix.go net: refactor poller into new internal/poll package 2017-02-13 18:36:28 +00:00
error_test.go os, net, internal/poll: return consistent error for closed socket 2017-04-26 00:03:14 +00:00
error_unix_test.go
error_windows_test.go
example_test.go net: update documentation on Listen and ListenPacket 2017-06-22 08:31:13 +00:00
external_test.go net: delay IP protocol stack-snooping system calls 2017-04-15 22:22:09 +00:00
fd_plan9.go net: delay IP protocol stack-snooping system calls 2017-04-15 22:22:09 +00:00
fd_unix.go net: handle spurious netpoll wakeups in connect 2017-06-15 22:39:39 +00:00
fd_windows.go net: handle spurious netpoll wakeups in connect 2017-06-15 22:39:39 +00:00
file_plan9.go
file_stub.go
file_test.go os, net, internal/poll: return consistent error for closed socket 2017-04-26 00:03:14 +00:00
file_unix.go net: refactor poller into new internal/poll package 2017-02-13 18:36:28 +00:00
file_windows.go
file.go
hook_plan9.go
hook_unix.go net: refactor poller into new internal/poll package 2017-02-13 18:36:28 +00:00
hook_windows.go net: refactor poller into new internal/poll package 2017-02-13 18:36:28 +00:00
hook.go
hosts_test.go
hosts.go
interface_bsd_test.go
interface_bsd.go
interface_bsdvar.go
interface_darwin.go
interface_freebsd.go
interface_linux_test.go
interface_linux.go net: remove unused Interface parameter 2017-03-07 16:37:07 +00:00
interface_plan9.go
interface_solaris.go
interface_stub.go
interface_test.go net: delay IP protocol stack-snooping system calls 2017-04-15 22:22:09 +00:00
interface_unix_test.go
interface_windows_test.go
interface_windows.go net: simplify probeWindowsIPStack 2017-04-28 00:03:30 +00:00
interface.go net: make zone helpers into methods of ipv6ZoneCache 2017-04-28 00:03:17 +00:00
ip_test.go net: don't enclose non-literal IPv6 addresses in square brackets 2017-04-14 08:44:22 +00:00
ip.go net: update documentation on IP.IsUnspecified 2017-06-23 00:09:48 +00:00
iprawsock_plan9.go
iprawsock_posix.go net: make zone helpers into methods of ipv6ZoneCache 2017-04-28 00:03:17 +00:00
iprawsock_test.go net: validate network in Dial{,IP} and Listen{Packet,IP} for IP networks 2017-04-14 08:44:45 +00:00
iprawsock.go net: don't return IPv4 unspecified addr for Resolve*Addr of [::] or [::]:n 2017-07-06 05:39:42 +00:00
ipsock_plan9.go net: defer file.close() + minor style cleanup 2017-04-26 03:12:20 +00:00
ipsock_posix.go net: make zone helpers into methods of ipv6ZoneCache 2017-04-28 00:03:17 +00:00
ipsock_test.go net: delay IP protocol stack-snooping system calls 2017-04-15 22:22:09 +00:00
ipsock.go net: don't return IPv4 unspecified addr for Resolve*Addr of [::] or [::]:n 2017-07-06 05:39:42 +00:00
listen_test.go net: delay IP protocol stack-snooping system calls 2017-04-15 22:22:09 +00:00
lookup_nacl.go
lookup_plan9.go net: fix LookupCNAME on Plan 9 2017-08-08 08:00:09 +00:00
lookup_test.go all: prefer strings.IndexByte over strings.Index 2017-09-25 17:35:41 +00:00
lookup_unix.go net: support all PacketConn and Conn returned by Resolver.Dial 2017-06-08 21:53:49 +00:00
lookup_windows_test.go
lookup_windows.go net: make zone helpers into methods of ipv6ZoneCache 2017-04-28 00:03:17 +00:00
lookup.go net: clarify the length limit for service name 2017-07-06 14:02:46 +00:00
mac_test.go
mac.go
main_cloexec_test.go net, internal/poll, net/internal/socktest: use accept4 and SOCK_{CLOEXEC,NONBLOCK} on dragonfly 2017-04-18 03:56:16 +00:00
main_conf_test.go
main_noconf_test.go
main_plan9_test.go
main_posix_test.go
main_test.go net: don't return IPv4 unspecified addr for Resolve*Addr of [::] or [::]:n 2017-07-06 05:39:42 +00:00
main_unix_test.go net: refactor poller into new internal/poll package 2017-02-13 18:36:28 +00:00
main_windows_test.go net: refactor poller into new internal/poll package 2017-02-13 18:36:28 +00:00
mockserver_test.go net: delay IP protocol stack-snooping system calls 2017-04-15 22:22:09 +00:00
net_test.go os, net, internal/poll: return consistent error for closed socket 2017-04-26 00:03:14 +00:00
net_windows_test.go net: fix Windows TestInterfaceHardwareAddrWithGetmac 2017-06-29 15:36:34 +00:00
net.go net: delay IP protocol stack-snooping system calls 2017-04-15 22:22:09 +00:00
netgo_unix_test.go net: add Resolver.StrictErrors 2017-03-09 21:59:00 +00:00
nss_test.go
nss.go
packetconn_test.go
parse_test.go
parse.go
pipe_test.go
pipe.go
platform_test.go net: delay IP protocol stack-snooping system calls 2017-04-15 22:22:09 +00:00
port_test.go
port_unix.go net: defer file.close() + minor style cleanup 2017-04-26 03:12:20 +00:00
port.go
protoconn_test.go
rawconn_unix_test.go net: add test for RawConn.Control on Windows 2017-05-20 00:45:56 +00:00
rawconn_windows_test.go net: add test for RawConn.Control on Windows 2017-05-20 00:45:56 +00:00
rawconn.go net: add test for RawConn.Control on Windows 2017-05-20 00:45:56 +00:00
sendfile_bsd.go net: refactor poller into new internal/poll package 2017-02-13 18:36:28 +00:00
sendfile_linux.go net: refactor poller into new internal/poll package 2017-02-13 18:36:28 +00:00
sendfile_solaris.go net: refactor poller into new internal/poll package 2017-02-13 18:36:28 +00:00
sendfile_stub.go
sendfile_test.go
sendfile_windows.go net: refactor poller into new internal/poll package 2017-02-13 18:36:28 +00:00
server_test.go
sock_bsd.go
sock_cloexec.go net, internal/poll, net/internal/socktest: use accept4 and SOCK_{CLOEXEC,NONBLOCK} on dragonfly 2017-04-18 03:56:16 +00:00
sock_linux.go
sock_plan9.go
sock_posix.go net: handle spurious netpoll wakeups in connect 2017-06-15 22:39:39 +00:00
sock_stub.go
sock_windows.go
sockopt_bsd.go net: delay IP protocol stack-snooping system calls 2017-04-15 22:22:09 +00:00
sockopt_linux.go
sockopt_plan9.go
sockopt_posix.go net: refactor poller into new internal/poll package 2017-02-13 18:36:28 +00:00
sockopt_solaris.go
sockopt_stub.go
sockopt_windows.go
sockoptip_bsdvar.go net, internal/poll: enable ListenMulticastUDP on solaris 2017-08-09 23:52:12 +00:00
sockoptip_linux.go net: refactor poller into new internal/poll package 2017-02-13 18:36:28 +00:00
sockoptip_posix.go net, internal/poll: enable ListenMulticastUDP on solaris 2017-08-09 23:52:12 +00:00
sockoptip_stub.go net, internal/poll: enable ListenMulticastUDP on solaris 2017-08-09 23:52:12 +00:00
sockoptip_windows.go net: refactor poller into new internal/poll package 2017-02-13 18:36:28 +00:00
sys_cloexec.go net, internal/poll, net/internal/socktest: use accept4 and SOCK_{CLOEXEC,NONBLOCK} on dragonfly 2017-04-18 03:56:16 +00:00
tcpsock_plan9.go net: fix close on closed listener on Plan 9 2017-04-26 15:04:43 +00:00
tcpsock_posix.go net: make zone helpers into methods of ipv6ZoneCache 2017-04-28 00:03:17 +00:00
tcpsock_test.go net: delay IP protocol stack-snooping system calls 2017-04-15 22:22:09 +00:00
tcpsock_unix_test.go net: handle spurious netpoll wakeups in connect 2017-06-15 22:39:39 +00:00
tcpsock.go net: don't return IPv4 unspecified addr for Resolve*Addr of [::] or [::]:n 2017-07-06 05:39:42 +00:00
tcpsockopt_darwin.go net: refactor poller into new internal/poll package 2017-02-13 18:36:28 +00:00
tcpsockopt_dragonfly.go net: use internal/poll for DragonFly setKeepAlivePeriod 2017-02-13 19:25:12 +00:00
tcpsockopt_openbsd.go
tcpsockopt_plan9.go
tcpsockopt_posix.go net: refactor poller into new internal/poll package 2017-02-13 18:36:28 +00:00
tcpsockopt_solaris.go net: refactor poller into new internal/poll package 2017-02-13 18:36:28 +00:00
tcpsockopt_stub.go
tcpsockopt_unix.go net: refactor poller into new internal/poll package 2017-02-13 18:36:28 +00:00
tcpsockopt_windows.go net: refactor poller into new internal/poll package 2017-02-13 18:36:28 +00:00
timeout_test.go net: refactor poller into new internal/poll package 2017-02-13 18:36:28 +00:00
udpsock_plan9_test.go
udpsock_plan9.go
udpsock_posix.go net: make zone helpers into methods of ipv6ZoneCache 2017-04-28 00:03:17 +00:00
udpsock_test.go net: delay IP protocol stack-snooping system calls 2017-04-15 22:22:09 +00:00
udpsock.go net: don't return IPv4 unspecified addr for Resolve*Addr of [::] or [::]:n 2017-07-06 05:39:42 +00:00
unixsock_plan9.go
unixsock_posix.go
unixsock_test.go
unixsock.go net: update documentation on methods of UnixConn 2017-06-22 21:37:54 +00:00
writev_test.go net: refactor poller into new internal/poll package 2017-02-13 18:36:28 +00:00
writev_unix.go net: refactor poller into new internal/poll package 2017-02-13 18:36:28 +00:00