utils

package
v0.0.0-...-7912886 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

pkg/utils/size.go

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Confirm

func Confirm(prompt string) bool

Confirm asks for user confirmation

func FormatSize

func FormatSize(bytes int64) string

FormatSize formats bytes to human readable format

func FormatSizeInGi

func FormatSizeInGi(bytes int64) string

FormatSizeInGi formats bytes to Gi with 2 decimal places

func ParseLabels

func ParseLabels(labels []string) (map[string]string, error)

ParseLabels parses key=value label pairs

func ParseSize

func ParseSize(size string) (int64, error)

ParseSize parses a size string (e.g., "10Gi", "1Ti") and returns bytes

func TruncateString

func TruncateString(str string, length int) string

TruncateString truncates a string to specified length

Types

This section is empty.

Jump to

Keyboard shortcuts

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