An open API service indexing awesome lists of open source software.

https://github.com/entrlcom/go-unit

Units of measurement
https://github.com/entrlcom/go-unit

Last synced: about 1 year ago
JSON representation

Units of measurement

Awesome Lists containing this project

README

          

# Unit

## Table of Content

- [Examples](#examples)
- [License](#license)

## Examples

```go
package main

import (
"io"
"net/http"

"entrlcom.dev/unit"
)

func main() {
// Ex: http.MaxBytesReader().
http.MaxBytesReader(w, r, unit.KiB * 2) // 2 KiB.

// Ex: io.LimitReader().
io.LimitReader(r, unit.MiB * 4) // 4 MiB.
}

```

## License

[MIT](https://choosealicense.com/licenses/mit/)