Skip to content
This repository has been archived by the owner on Mar 16, 2019. It is now read-only.

lunny/size

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Size

CircleCI codecov

Package size is a simple package to handle memory or disk size calculation or format

Installation

go get github.com/lunny/size

Usage

import (
    "fmt"

    . "github.com/lunny/size"
)

func main() {
    fmt.Println(10*M)

    size, _ := ParseSize("1.2K")
    fmt.Println(size)
}