Skip to content
This repository has been archived by the owner on Apr 9, 2023. It is now read-only.

Latest commit

 

History

History
28 lines (17 loc) · 441 Bytes

README.md

File metadata and controls

28 lines (17 loc) · 441 Bytes

Unit

Convert human readable units to what the computer understands

TODO

  • Storage units: B, KB, MB, GB, TB, PB

Getting Started

  1. Install the library

    go get github.com/short-d/unit
  2. Parse human readable unit

    import "github.com/short-d/unit"
    
    oneWeekStr := "1w"
    oneWeek, err := unit.ParseDuration(oneWeekStr)

License

This project is maintained under MIT license.