utils

package
v0.0.0-...-69f0769 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	IP_DEFAULT = "127.0.0.1"
)

Variables

This section is empty.

Functions

func Byte2Str

func Byte2Str(b []byte) string

func GetActiveIP

func GetActiveIP() (ipv4 string, err error)

auto get a network accessable IP in both Linux and Windows

func GetActiveInterface

func GetActiveInterface() (resIface *net.Interface)

func GetAllInterfaces

func GetAllInterfaces() ([]net.Interface, error)

func GetLocalIPByName

func GetLocalIPByName(iface_name string) (string, error)

iface_name is the interface name eg:in windows10 'WLAN' is the wireless interface card name

func Str2Byte

func Str2Byte(s string) []byte

Types

This section is empty.

Jump to

Keyboard shortcuts

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