cgo_stub.go 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  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. //go:build !cgo || netgo
  5. package net
  6. import "context"
  7. func init() { netGo = true }
  8. type addrinfoErrno int
  9. func (eai addrinfoErrno) Error() string { return "<nil>" }
  10. func (eai addrinfoErrno) Temporary() bool { return false }
  11. func (eai addrinfoErrno) Timeout() bool { return false }
  12. func cgoLookupHost(ctx context.Context, name string) (addrs []string, err error, completed bool) {
  13. return nil, nil, false
  14. }
  15. func cgoLookupPort(ctx context.Context, network, service string) (port int, err error, completed bool) {
  16. return 0, nil, false
  17. }
  18. func cgoLookupIP(ctx context.Context, network, name string) (addrs []IPAddr, err error, completed bool) {
  19. return nil, nil, false
  20. }
  21. func cgoLookupCNAME(ctx context.Context, name string) (cname string, err error, completed bool) {
  22. return "", nil, false
  23. }
  24. func cgoLookupPTR(ctx context.Context, addr string) (ptrs []string, err error, completed bool) {
  25. return nil, nil, false
  26. }