Skip to content

Commit

Permalink
Fixed Generic Value SizeInBytes for units above the kb
Browse files Browse the repository at this point in the history
  • Loading branch information
Davide Bonomini committed Nov 9, 2023
1 parent 12d9dc9 commit 1a6b80c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/generic/generic.go
Original file line number Diff line number Diff line change
Expand Up @@ -318,13 +318,13 @@ func (v Value) SizeInBytes() uint64 {
case "kb":
base *= 1024
case "mb":
base *= 1024 * 1024 * 1024
base *= 1024 * 1024
case "gb":
base *= 1024 * 1024 * 1024 * 1024
base *= 1024 * 1024 * 1024
case "tb":
base *= 1024 * 1024 * 1024 * 1024 * 1024
base *= 1024 * 1024 * 1024 * 1024
case "eb":
base *= 1024 * 1024 * 1024 * 1024 * 1024 * 1024
base *= 1024 * 1024 * 1024 * 1024 * 1024
}

return base
Expand Down

0 comments on commit 1a6b80c

Please sign in to comment.