cgo_stub_moxie.mx raw

   1  // Moxie does not use cgo for DNS. Pure Go resolver only.
   2  
   3  package net
   4  
   5  import "context"
   6  
   7  // cgoAvailable is false — moxie uses the pure Go DNS resolver.
   8  const cgoAvailable = false
   9  
  10  func cgoLookupHost(_ context.Context, name []byte) ([][]byte, error) {
  11  	return nil, &DNSError{Err: "cgo resolver not available", Name: name}
  12  }
  13  
  14  func cgoLookupPort(_ context.Context, network, service []byte) (int, error) {
  15  	return 0, &DNSError{Err: "cgo resolver not available", Name: network + "/" + service}
  16  }
  17  
  18  func cgoLookupIP(_ context.Context, network, name []byte) ([]IPAddr, error) {
  19  	return nil, &DNSError{Err: "cgo resolver not available", Name: name}
  20  }
  21  
  22  func cgoLookupCNAME(_ context.Context, name []byte) ([]byte, error, bool) {
  23  	return "", nil, false
  24  }
  25  
  26  func cgoLookupPTR(_ context.Context, addr []byte) ([][]byte, error) {
  27  	return nil, &DNSError{Err: "cgo resolver not available", Name: addr}
  28  }
  29