github.com/mtsmfm/go/src@v0.0.0-20221020090648-44bdcb9f8fde/net/cgo_stub.go (about) 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. 4 5 //go:build !cgo || netgo 6 7 package net 8 9 import "context" 10 11 type addrinfoErrno int 12 13 func (eai addrinfoErrno) Error() string { return "<nil>" } 14 func (eai addrinfoErrno) Temporary() bool { return false } 15 func (eai addrinfoErrno) Timeout() bool { return false } 16 17 func cgoLookupHost(ctx context.Context, name string) (addrs []string, err error, completed bool) { 18 return nil, nil, false 19 } 20 21 func cgoLookupPort(ctx context.Context, network, service string) (port int, err error, completed bool) { 22 return 0, nil, false 23 } 24 25 func cgoLookupIP(ctx context.Context, network, name string) (addrs []IPAddr, err error, completed bool) { 26 return nil, nil, false 27 } 28 29 func cgoLookupCNAME(ctx context.Context, name string) (cname string, err error, completed bool) { 30 return "", nil, false 31 } 32 33 func cgoLookupPTR(ctx context.Context, addr string) (ptrs []string, err error, completed bool) { 34 return nil, nil, false 35 }