Documentation
¶
Overview ¶
Package sdlocal 获取本机信息
Index ¶
- func Arch() string
- func HomeDir() string
- func Hostname() string
- func IP(predicates ...IPPredicate) (net.IP, error)
- func IPString(predicates ...IPPredicate) string
- func IPs(predicates ...IPPredicate) ([]net.IP, error)
- func NetInterfaceNames() ([]string, error)
- func NumCPU() int
- func OS() string
- func PrivateIP4String(ifaceNames ...string) string
- type IPPredicate
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IPString ¶
func IPString(predicates ...IPPredicate) string
func NetInterfaceNames ¶
func PrivateIP4String ¶
Types ¶
type IPPredicate ¶
func Is4 ¶
func Is4() IPPredicate
func IsLoopback ¶
func IsLoopback() IPPredicate
func IsMulticast ¶
func IsMulticast() IPPredicate
func IsPrivate ¶
func IsPrivate() IPPredicate
func NameIs ¶
func NameIs(ifaceName string, others ...string) IPPredicate
func (IPPredicate) Not ¶
func (p IPPredicate) Not() IPPredicate
Click to show internal directories.
Click to hide internal directories.