util

package
v0.2.13 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatDateTime

func FormatDateTime(t time.Time) string

FormatDateTime Influenced by parallelism, small probability took the old value. Because it is logging, we don't make it so strict

func GetAllIFaceName

func GetAllIFaceName() ([]string, error)

func GetAllLocalIp

func GetAllLocalIp() ([]string, error)

func GetCaller

func GetCaller() *runtime.Frame

GetCaller retrieves the name of the first non-log calling function

func GetCallerInfo

func GetCallerInfo(callerSkip int) (callerFile, callerName string, callerLine int)

func GetFirstLocalIp

func GetFirstLocalIp() (string, error)

func GetIpV4ByIFace

func GetIpV4ByIFace(name string) (string, error)

func IpInt2Str

func IpInt2Str(ip uint32) string

func IpStr2Int

func IpStr2Int(ip string) uint32

func IsLittleEndian

func IsLittleEndian() bool

func IsLocalIpV4

func IsLocalIpV4(ip net.IP) bool

func JoinKV added in v0.2.0

func JoinKV(key string, value interface{}) string

func ParsePackageName

func ParsePackageName(f string) (string, string)

func UMask

func UMask(mask int) int

Types

This section is empty.

Jump to

Keyboard shortcuts

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