vendor: add buildkit

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
This commit is contained in:
Tonis Tiigi
2019-03-23 22:44:59 -07:00
parent 62faee5f07
commit 8b7c38e61a
364 changed files with 78556 additions and 1007 deletions

29
vendor/github.com/tonistiigi/units/readme.md generated vendored Normal file
View File

@@ -0,0 +1,29 @@
#### Simple byte size formatting.
This package implements types that can be used in stdlib formatting functions
like `fmt.Printf` to control the output of the expected printed string.
Floating point flags `%f` and %g print the value in using the correct unit
suffix. Decimal units are default, `#` switches to binary units. If a value is
best represented as full bytes, integer bytes are printed instead.
##### Examples:
```
fmt.Printf("%.2f", 123 * B) => "123B"
fmt.Printf("%.2f", 1234 * B) => "1.23kB"
fmt.Printf("%g", 1200 * B) => "1.2kB"
fmt.Printf("%#g", 1024 * B) => "1KiB"
```
Integer flag `%d` always prints the value in bytes. `#` flag adds an unit prefix.
##### Examples:
```
fmt.Printf("%d", 1234 * B) => "1234"
fmt.Printf("%#d", 1234 * B) => "1234B"
```
`%v` is equal to `%g`