forked from TrueCloudLab/rclone
fs: add multipliers for SizeSuffix
This commit is contained in:
parent
9c90b5e77c
commit
9815b09d90
1 changed files with 11 additions and 0 deletions
|
@ -13,6 +13,17 @@ import (
|
||||||
// SizeSuffix is an int64 with a friendly way of printing setting
|
// SizeSuffix is an int64 with a friendly way of printing setting
|
||||||
type SizeSuffix int64
|
type SizeSuffix int64
|
||||||
|
|
||||||
|
// Common multipliers for SizeSuffix
|
||||||
|
const (
|
||||||
|
Byte SizeSuffix = 1 << (iota * 10)
|
||||||
|
KibiByte
|
||||||
|
MebiByte
|
||||||
|
GibiByte
|
||||||
|
TebiByte
|
||||||
|
PebiByte
|
||||||
|
ExbiByte
|
||||||
|
)
|
||||||
|
|
||||||
// Turn SizeSuffix into a string and a suffix
|
// Turn SizeSuffix into a string and a suffix
|
||||||
func (x SizeSuffix) string() (string, string) {
|
func (x SizeSuffix) string() (string, string) {
|
||||||
scaled := float64(0)
|
scaled := float64(0)
|
||||||
|
|
Loading…
Add table
Reference in a new issue