diff options
Diffstat (limited to 'src/pkg/net/net.go')
-rw-r--r-- | src/pkg/net/net.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/pkg/net/net.go b/src/pkg/net/net.go index 047447870..c0c1c3b8a 100644 --- a/src/pkg/net/net.go +++ b/src/pkg/net/net.go @@ -129,6 +129,9 @@ type OpError struct { } func (e *OpError) String() string { + if e == nil { + return "<nil>" + } s := e.Op if e.Net != "" { s += " " + e.Net @@ -164,6 +167,9 @@ type AddrError struct { } func (e *AddrError) String() string { + if e == nil { + return "<nil>" + } s := e.Error if e.Addr != "" { s += " " + e.Addr |