bytex

package
v0.0.0-...-012d1c6 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

from: https://github.com/labstack/gommon

Index

Constants

View Source
const (
	KB
	MB
	GB
	TB
	PB
	EB
)

Variables

This section is empty.

Functions

func Format

func Format(b int64) string

Format formats bytes integer to human readable string. For example, 31323 bytes will return 30.59KB.

func Parse

func Parse(value string) (i int64, err error)

Parse parses human readable bytes string to bytes integer. For example, 6GB (6G is also valid) will return 6442450944.

Types

This section is empty.

Jump to

Keyboard shortcuts

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