summaryrefslogtreecommitdiff
path: root/src/pkg/net/udpsock.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/pkg/net/udpsock.go')
-rw-r--r--src/pkg/net/udpsock.go17
1 files changed, 4 insertions, 13 deletions
diff --git a/src/pkg/net/udpsock.go b/src/pkg/net/udpsock.go
index f3b6bf6a4..4449e8379 100644
--- a/src/pkg/net/udpsock.go
+++ b/src/pkg/net/udpsock.go
@@ -28,14 +28,9 @@ type UDPAddr struct {
}
// Network returns the address's network name, "udp".
-func (a *UDPAddr) Network() string {
- return "udp";
-}
-
-func (a *UDPAddr) String() string {
- return joinHostPort(a.IP.String(), itoa(a.Port));
+func (a *UDPAddr) Network() string { return "udp" }
-}
+func (a *UDPAddr) String() string { return joinHostPort(a.IP.String(), itoa(a.Port)) }
func (a *UDPAddr) family() int {
if a == nil || len(a.IP) <= 4 {
@@ -76,13 +71,9 @@ type UDPConn struct {
fd *netFD;
}
-func newUDPConn(fd *netFD) *UDPConn {
- return &UDPConn{fd};
-}
+func newUDPConn(fd *netFD) *UDPConn { return &UDPConn{fd} }
-func (c *UDPConn) ok() bool {
- return c != nil && c.fd != nil;
-}
+func (c *UDPConn) ok() bool { return c != nil && c.fd != nil }
// Implementation of the Conn interface - see Conn for documentation.