package bytes
import "github.com/labstack/gommon/bytes"
Index ¶
Constants ¶
const ( KB MB GB TB PB EB )
Functions ¶
func Format ¶
Format wraps global Bytes's Format function.
func Parse ¶
Parse wraps global Bytes's Parse function.
Types ¶
type Bytes ¶
type Bytes struct{}
Bytes struct
func New ¶
func New() *Bytes
New creates a Bytes instance.
func (*Bytes) Format ¶
Format formats bytes integer to human readable string. For example, 31323 bytes will return 30.59KB.
func (*Bytes) Parse ¶
Parse parses human readable bytes string to bytes integer. For example, 6GB (6G is also valid) will return 6442450944.
Source Files ¶
- Version
- v0.3.1
- Published
- Nov 5, 2021
- Platform
- windows/amd64
- Imports
- 4 packages
- Last checked
- 6 minutes ago –
Tools for package owners.