utils

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: May 18, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package utils hosts small helper routines shared across commands.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AskConfirm

func AskConfirm(ctx context.Context, prompt string) (bool, error)

AskConfirm prompts the user with the provided message and returns true if the user confirms. It allows up to maxConfirmAttempts tries before returning false.

ctx must be non-nil; passing nil is a programmer error.

func FormatSize

func FormatSize(bytes uint64) string

FormatSize converts bytes to a human-readable string (B, KB, MB, GB).

Types

This section is empty.

Jump to

Keyboard shortcuts

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