utils

package
v0.0.0-...-732dc05 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ChooseCommand

func ChooseCommand(cmd *cobra.Command, args []string, renderer render.Renderer) error

ChooseCommand runs interactive menu with selection of available commands.

func GetPercentage

func GetPercentage(total, currentValue uint64) uint64

GetPercentage calculates what percentage 'currentValue' is of 'total'.

func Map

func Map[T, V any](ts []T, fn func(T) V) []V

Map maps slice of elements with type T to slice with type V using function fn.

func ValidateEmptyString

func ValidateEmptyString() func(string) error

ValidateEmptyString returns an error if the string is empty.

func ValidateFileFormat

func ValidateFileFormat(formats ...string) func(string) error

ValidateFileFormat returns an error if the file format is not supported.

Types

This section is empty.

Jump to

Keyboard shortcuts

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