util

package
v0.3.10 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const BINARY_KILO = 1024

Variables

This section is empty.

Functions

func Average added in v0.3.8

func Average(xs []float64) float64

func BytesToBits

func BytesToBits(b float64) float64

func BytesToGibiBytes

func BytesToGibiBytes(b uint64) uint64

func BytesToMebiBytes

func BytesToMebiBytes(b float64) float64

func BytesToMegaBytes

func BytesToMegaBytes(b float64) float64

func CommonBase added in v0.3.8

func CommonBase(strings ...string) string

func KibiBytesToMebiBytes added in v0.2.2

func KibiBytesToMebiBytes(b uint64) uint64

func ParseZfsSize added in v0.3.0

func ParseZfsSize(size string) (uint64, error)

func RoundTwoDecimals

func RoundTwoDecimals(n float64) float64

Types

type IndexedValue added in v0.2.2

type IndexedValue[T any] struct {
	Index int
	Value T
}

Jump to

Keyboard shortcuts

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