sdlocal

package
v0.1.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 16, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package sdlocal 获取本机信息

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Arch

func Arch() string

func HomeDir

func HomeDir() string

func Hostname

func Hostname() string

func IP

func IP(predicates ...IPPredicate) (net.IP, error)

func IPString

func IPString(predicates ...IPPredicate) string

func IPs

func IPs(predicates ...IPPredicate) ([]net.IP, error)

func NetInterfaceNames

func NetInterfaceNames() ([]string, error)

func NumCPU

func NumCPU() int

func OS

func OS() string

func PrivateIP4String

func PrivateIP4String(ifaceNames ...string) string

Types

type IPPredicate

type IPPredicate func(net.Interface, net.IP) bool

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL