1
0

net.go 4.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. // +build !appengine
  2. package packages
  3. import (
  4. "net"
  5. "reflect"
  6. "github.com/mattn/anko/env"
  7. )
  8. func init() {
  9. env.Packages["net"] = map[string]reflect.Value{
  10. "CIDRMask": reflect.ValueOf(net.CIDRMask),
  11. "Dial": reflect.ValueOf(net.Dial),
  12. "DialIP": reflect.ValueOf(net.DialIP),
  13. "DialTCP": reflect.ValueOf(net.DialTCP),
  14. "DialTimeout": reflect.ValueOf(net.DialTimeout),
  15. "DialUDP": reflect.ValueOf(net.DialUDP),
  16. "DialUnix": reflect.ValueOf(net.DialUnix),
  17. "ErrWriteToConnected": reflect.ValueOf(net.ErrWriteToConnected),
  18. "FileConn": reflect.ValueOf(net.FileConn),
  19. "FileListener": reflect.ValueOf(net.FileListener),
  20. "FilePacketConn": reflect.ValueOf(net.FilePacketConn),
  21. "FlagBroadcast": reflect.ValueOf(net.FlagBroadcast),
  22. "FlagLoopback": reflect.ValueOf(net.FlagLoopback),
  23. "FlagMulticast": reflect.ValueOf(net.FlagMulticast),
  24. "FlagPointToPoint": reflect.ValueOf(net.FlagPointToPoint),
  25. "FlagUp": reflect.ValueOf(net.FlagUp),
  26. "IPv4": reflect.ValueOf(net.IPv4),
  27. "IPv4Mask": reflect.ValueOf(net.IPv4Mask),
  28. "IPv4allrouter": reflect.ValueOf(net.IPv4allrouter),
  29. "IPv4allsys": reflect.ValueOf(net.IPv4allsys),
  30. "IPv4bcast": reflect.ValueOf(net.IPv4bcast),
  31. "IPv4len": reflect.ValueOf(net.IPv4len),
  32. "IPv4zero": reflect.ValueOf(net.IPv4zero),
  33. "IPv6interfacelocalallnodes": reflect.ValueOf(net.IPv6interfacelocalallnodes),
  34. "IPv6len": reflect.ValueOf(net.IPv6len),
  35. "IPv6linklocalallnodes": reflect.ValueOf(net.IPv6linklocalallnodes),
  36. "IPv6linklocalallrouters": reflect.ValueOf(net.IPv6linklocalallrouters),
  37. "IPv6loopback": reflect.ValueOf(net.IPv6loopback),
  38. "IPv6unspecified": reflect.ValueOf(net.IPv6unspecified),
  39. "IPv6zero": reflect.ValueOf(net.IPv6zero),
  40. "InterfaceAddrs": reflect.ValueOf(net.InterfaceAddrs),
  41. "InterfaceByIndex": reflect.ValueOf(net.InterfaceByIndex),
  42. "InterfaceByName": reflect.ValueOf(net.InterfaceByName),
  43. "Interfaces": reflect.ValueOf(net.Interfaces),
  44. "JoinHostPort": reflect.ValueOf(net.JoinHostPort),
  45. "Listen": reflect.ValueOf(net.Listen),
  46. "ListenIP": reflect.ValueOf(net.ListenIP),
  47. "ListenMulticastUDP": reflect.ValueOf(net.ListenMulticastUDP),
  48. "ListenPacket": reflect.ValueOf(net.ListenPacket),
  49. "ListenTCP": reflect.ValueOf(net.ListenTCP),
  50. "ListenUDP": reflect.ValueOf(net.ListenUDP),
  51. "ListenUnix": reflect.ValueOf(net.ListenUnix),
  52. "ListenUnixgram": reflect.ValueOf(net.ListenUnixgram),
  53. "LookupAddr": reflect.ValueOf(net.LookupAddr),
  54. "LookupCNAME": reflect.ValueOf(net.LookupCNAME),
  55. "LookupHost": reflect.ValueOf(net.LookupHost),
  56. "LookupIP": reflect.ValueOf(net.LookupIP),
  57. "LookupMX": reflect.ValueOf(net.LookupMX),
  58. "LookupNS": reflect.ValueOf(net.LookupNS),
  59. "LookupPort": reflect.ValueOf(net.LookupPort),
  60. "LookupSRV": reflect.ValueOf(net.LookupSRV),
  61. "LookupTXT": reflect.ValueOf(net.LookupTXT),
  62. "ParseCIDR": reflect.ValueOf(net.ParseCIDR),
  63. "ParseIP": reflect.ValueOf(net.ParseIP),
  64. "ParseMAC": reflect.ValueOf(net.ParseMAC),
  65. "Pipe": reflect.ValueOf(net.Pipe),
  66. "ResolveIPAddr": reflect.ValueOf(net.ResolveIPAddr),
  67. "ResolveTCPAddr": reflect.ValueOf(net.ResolveTCPAddr),
  68. "ResolveUDPAddr": reflect.ValueOf(net.ResolveUDPAddr),
  69. "ResolveUnixAddr": reflect.ValueOf(net.ResolveUnixAddr),
  70. "SplitHostPort": reflect.ValueOf(net.SplitHostPort),
  71. }
  72. }