Documentation
¶
Index ¶
- func ByteStringToNumber(input string) (uint64, error)
- func ExtractFilenameFromURL(urlStr string) string
- func HumanizeBytes(bytes uint64) string
- func ParseUsizeRange(value string, maxValue int) ([]int, error)
- func ReplaceInvalidCharsInFilename(input string) string
- func StrVectorsIntersect(first, second []string) bool
- func UnionUsizeRanges(values []string, maxValue int) ([]int, error)
- type TableBuilder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ByteStringToNumber ¶
ByteStringToNumber parses human-readable byte strings like "500MB", "2GiB"
func ExtractFilenameFromURL ¶
ExtractFilenameFromURL extracts the filename from a URL path
func HumanizeBytes ¶
HumanizeBytes formats bytes as human-readable string (KiB, MiB, GiB, TiB)
func ParseUsizeRange ¶
ParseUsizeRange parses a range string and returns all values in that range. Supported formats: - Single value: "42" -> [42] - Range with beginning and end: "1-5" -> [1,2,3,4,5] - Range with no end: "10-" -> [10...maxValue] - Range with no beginning: "-5" -> [1,2,3,4,5] Note: ranges start at 1, not 0
func ReplaceInvalidCharsInFilename ¶
ReplaceInvalidCharsInFilename sanitizes filenames by replacing invalid characters
func StrVectorsIntersect ¶
StrVectorsIntersect checks if two string slices have any common element (case-insensitive)
Types ¶
type TableBuilder ¶
type TableBuilder struct {
// contains filtered or unexported fields
}
TableBuilder wraps tablewriter for consistent formatting
func NewTable ¶
func NewTable(headers []string) *TableBuilder
NewTable creates a new table with the given headers
func (*TableBuilder) AddRow ¶
func (tb *TableBuilder) AddRow(row []string)
AddRow adds a row to the table