Skip to content

Latest commit

 

History

History
32 lines (21 loc) · 396 Bytes

README.md

File metadata and controls

32 lines (21 loc) · 396 Bytes

Unit

Table of Content

Examples

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