Documentation ¶
Index ¶
- func AdjustByteSlice(src []byte, size int) []byte
- func Download(uri string) ([]byte, error)
- func DownloadAsFile(uri string, filepath string) error
- func GetAllIP() []net.IP
- func GetExternalIP() string
- func GetOutboundIP() net.IP
- func InetAton(ip net.IP) int64
- func InetNtoa(ipnr int64) net.IP
- func IpBetween(from net.IP, to net.IP, test net.IP) bool
- func IsInternetOK() (ok bool)
- func IsPublicIP(IP net.IP) bool
- func MergeBytes(bs [][]byte) []byte
- func NetAddr2IPPort(addr net.Addr) (ip string, port int)
- type IP
- type IPInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AdjustByteSlice ¶
调整slice的长度到size,如果不足则右侧补0,超出则截断
func DownloadAsFile ¶
func GetOutboundIP ¶
func IsInternetOK ¶
func IsInternetOK() (ok bool)
func IsPublicIP ¶
func MergeBytes ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.