util

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2021 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetExternalIP

func GetExternalIP() string

GetExternalIP 获取公网IP

func GetLocalIP

func GetLocalIP() string

GetLocalIP 获得内网IP

func GetOutboundIP

func GetOutboundIP() net.IP

GetOutboundIP 获得本机内网IP,这个函数只能在启动的时候掉,运行中掉有风险

func LoadConfig

func LoadConfig(filename string, v interface{}) error

func SaveConfig

func SaveConfig(filename string, v interface{}) error

Types

type ConsoleLogWriter

type ConsoleLogWriter chan *l4g.LogRecord

This is the standard writer that prints to standard output.

func NewColorConsoleLogWriter

func NewColorConsoleLogWriter() ConsoleLogWriter

This creates a new ConsoleLogWriter

func (ConsoleLogWriter) Close

func (w ConsoleLogWriter) Close()

Close stops the logger from sending messages to standard output. Attempts to send log messages to this logger after a Close have undefined behavior.

func (ConsoleLogWriter) LogWrite

func (w ConsoleLogWriter) LogWrite(rec *l4g.LogRecord)

This is the ConsoleLogWriter's output method. This will block if the output buffer is full.

Jump to

Keyboard shortcuts

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