Help us shape the future of Go! Take the 2026 Go Developer Survey

util

package
v1.37.1 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2026 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BYTE int64 = 1.0 << (10 * iota)
	KIBIBYTE
	MEBIBYTE
	GIBIBYTE
	TEBIBYTE
)
View Source
const (
	FSTypeExt3  = "ext3"
	FSTypeExt4  = "ext4"
	FSTypeXfs   = "xfs"
	FSTypeBtrfs = "btrfs"
)

Variables

This section is empty.

Functions

func RoundUpSize

func RoundUpSize(volumeSizeBytes, allocationUnitBytes int64) int64

RoundUpSize calculates how many allocation units are needed to accommodate a volume of given size. E.g. when user wants 1500MiB volume, while AWS EBS allocates volumes in gibibyte-sized chunks, RoundUpSize(1500 * 1024*1024, 1024*1024*1024) returns '2' (2 GiB is the smallest allocatable volume that can hold 1500MiB)

Types

This section is empty.

Directories

Path Synopsis
Package mount is a generated GoMock package.
Package mount is a generated GoMock package.

Jump to

Keyboard shortcuts

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