diff options
author | Ian Lance Taylor <ian@gcc.gnu.org> | 2013-07-16 06:54:42 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2013-07-16 06:54:42 +0000 |
commit | be47d6eceffd2c5dbbc1566d5eea490527fb2bd4 (patch) | |
tree | 0e8fda573576bb4181dba29d0e88380a8c38fafd /libgo/go/net/unixsock.go | |
parent | efb30cdeb003fd7c585ee0d7657340086abcbd9e (diff) | |
download | gcc-be47d6eceffd2c5dbbc1566d5eea490527fb2bd4.zip gcc-be47d6eceffd2c5dbbc1566d5eea490527fb2bd4.tar.gz gcc-be47d6eceffd2c5dbbc1566d5eea490527fb2bd4.tar.bz2 |
libgo: Update to Go 1.1.1.
From-SVN: r200974
Diffstat (limited to 'libgo/go/net/unixsock.go')
-rw-r--r-- | libgo/go/net/unixsock.go | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/libgo/go/net/unixsock.go b/libgo/go/net/unixsock.go index ae09569..21a19ec 100644 --- a/libgo/go/net/unixsock.go +++ b/libgo/go/net/unixsock.go @@ -2,8 +2,6 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// Unix domain sockets - package net // UnixAddr represents the address of a Unix domain socket end point. @@ -12,7 +10,8 @@ type UnixAddr struct { Net string } -// Network returns the address's network name, "unix" or "unixgram". +// Network returns the address's network name, "unix", "unixgram" or +// "unixpacket". func (a *UnixAddr) Network() string { return a.Net } @@ -36,11 +35,9 @@ func (a *UnixAddr) toAddr() Addr { // "unixpacket". func ResolveUnixAddr(net, addr string) (*UnixAddr, error) { switch net { - case "unix": - case "unixpacket": - case "unixgram": + case "unix", "unixgram", "unixpacket": + return &UnixAddr{Name: addr, Net: net}, nil default: return nil, UnknownNetworkError(net) } - return &UnixAddr{addr, net}, nil } |