util

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2024 License: MIT Imports: 10 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

Functions

func Bytes2String

func Bytes2String(bs []byte) string

func DirExist

func DirExist(path string) bool

func FileExist

func FileExist(path string) bool

func Float64ToUint64

func Float64ToUint64(val float64) uint64

func GetNicSpeed

func GetNicSpeed(nic string) (int, error)

GetNicSpeed get nic speed in Mbps.

func Int64ToUint64

func Int64ToUint64(val int64) uint64

func NetDevStats

func NetDevStats(nic ...string) (map[string]map[string]uint64, error)

func PathExist

func PathExist(path string, isDir bool) bool

func RandInt

func RandInt(min, max int) int

func String2Bytes

func String2Bytes(s string) []byte

func String2BytesNoCap

func String2BytesNoCap(s string) []byte

func Uint64ToFloat64

func Uint64ToFloat64(val uint64) float64

func Uint64ToInt64

func Uint64ToInt64(val uint64) int64

func Unique

func Unique[S ~[]E, E comparable](s S) S

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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