Skip to content

Commit

Permalink
Merge pull request #102 from getevo/generic_sizeinbytes_fix
Browse files Browse the repository at this point in the history
Fixed Generic Value SizeInBytes for units above the kb
  • Loading branch information
davidebono1 authored Nov 9, 2023
2 parents 12d9dc9 + 1a6b80c commit 8e12884
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 8e12884

Please sign in to comment.