traffic

package
v1.2.7 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2026 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Mb  = "Mb"
	MiB = "MiB"
	Gb  = "Gb"
	GiB = "GiB"
	Tb  = "Tb"
	TiB = "TiB"
)

Variables

This section is empty.

Functions

func AutoConvert

func AutoConvert(bits int64, useBinary bool) string

AutoConvert converts the given traffic in bits to the largest possible unit and returns a formatted string

func Convert

func Convert(bits int64, unit string) float64

Convert converts the given traffic in bits to the specified unit ("MiB" or "GiB")

Types

This section is empty.

Jump to

Keyboard shortcuts

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