fmtutil

package
v0.0.0-...-3d7d32e Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package fmtutil provides small formatting helpers shared by internal packages.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatBytes

func FormatBytes(bytes int64, precision int) string

FormatBytes returns bytes formatted with binary units and the given precision.

func RepeatChar

func RepeatChar(c byte, n int) string

RepeatChar returns c repeated n times.

func TruncateString

func TruncateString(s string, maxLen int) string

TruncateString truncates s to maxLen, adding "..." when it fits.

func TruncateStringPlain

func TruncateStringPlain(s string, maxLen int) string

TruncateStringPlain truncates s to maxLen without adding an ellipsis.

Types

This section is empty.

Jump to

Keyboard shortcuts

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