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
- Host: GitHub
- URL: https://github.com/entrlcom/go-unit
- Owner: entrlcom
- License: mit
- Created: 2024-06-12T06:50:08.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-06-12T07:15:11.000Z (about 2 years ago)
- Last Synced: 2025-02-13T09:47:50.986Z (over 1 year ago)
- Language: Go
- Size: 4.88 KB
- Stars: 2
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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/)