the-forges / bitty

A memory unit conversion library that makes working with multiple sizes and SI/IEC standards straight forward

Home Page:https://pkg.go.dev/github.com/the-forges/bitty

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Bitty

Build Status Go Report Card codecov

Bitty is a memory unit conversion library that makes working with multiple sizes and SI/IEC standards straight forward. It is based on unit ecapsulation, immutability, plugability, and testability: the idea that each unit should know how to operate with other valid units idempotently; every unit function returns a new unit or value, instead of changing itself; each unit implements interfaces so that it's easy to plug in new unit types (which also makes testing new unit types straight forward).

Features

Standards Compliance

Mathematics

  • Adding different units against each other
  • Subtracting units from each other
  • Multiplying units against each other
  • Dividing units from each other

Conversions

  • Unit conversions
  • Standard conversions

Helpers

  • Unit parsing
  • Finding a specific unit

About

A memory unit conversion library that makes working with multiple sizes and SI/IEC standards straight forward

https://pkg.go.dev/github.com/the-forges/bitty

License:Apache License 2.0


Languages

Language:Go 100.0%