format

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package format contains small, pure formatting helpers shared by the views.

They live in one place so byte and percentage rendering is consistent across every panel and easy to unit-test.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bytes

func Bytes(n int64) string

Bytes renders a byte count using IEC units (KiB, MiB, …), matching how Ceph itself reports capacity.

func Count

func Count(n int64) string

Count renders a large item count compactly, e.g. 52400 -> "52.4k".

func Percent

func Percent(ratio float64) string

Percent renders a 0..1 ratio as a whole-number percentage.

func Rate

func Rate(n int64) string

Rate renders a per-second byte rate, e.g. "120.0 MiB/s".

Types

This section is empty.

Jump to

Keyboard shortcuts

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