elutils

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefMinInt = 1000
	DefMaxInt = 9999
)

Functions

func DataSize

func DataSize(bytes uint64) string

DataSize format bytes number friendly. Usage:

file, err := os.Open(path)
fl, err := file.Stat()
fmtSize := DataSize(fl.Size())

func HowLongAgo

func HowLongAgo(sec int64) string

HowLongAgo format a seconds, get how lang ago

func MicroTimeID

func MicroTimeID() string

MicroTimeID generate. return like: 16074145697981929446(len: 20)

Types

This section is empty.

Jump to

Keyboard shortcuts

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