libgo: update to Go 1.11
[official-gcc.git] / libgo / go / net / cgo_stub.go
blob51259722aec8e6ce54d0d8e2ed46457afa02b3e4
1 // Copyright 2011 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
5 // +build !cgo netgo
7 package net
9 import "context"
11 func init() { netGo = true }
13 type addrinfoErrno int
15 func (eai addrinfoErrno) Error() string { return "<nil>" }
16 func (eai addrinfoErrno) Temporary() bool { return false }
17 func (eai addrinfoErrno) Timeout() bool { return false }
19 func cgoLookupHost(ctx context.Context, name string) (addrs []string, err error, completed bool) {
20 return nil, nil, false
23 func cgoLookupPort(ctx context.Context, network, service string) (port int, err error, completed bool) {
24 return 0, nil, false
27 func cgoLookupIP(ctx context.Context, name string) (addrs []IPAddr, err error, completed bool) {
28 return nil, nil, false
31 func cgoLookupCNAME(ctx context.Context, name string) (cname string, err error, completed bool) {
32 return "", nil, false
35 func cgoLookupPTR(ctx context.Context, addr string) (ptrs []string, err error, completed bool) {
36 return nil, nil, false