go-units API is missing a method which would parse "32kB" as 32000 bytes,
and "32kiB" as 32768 bytes. FromHumanSize() parses both as 32000 bytes,
while RAMInBytes() parses both as 32768 bytes.
This commit introduces a FromSize method a more litteral parsing of the
unit is needed. Modifiers without a unit ('32k') will be assumed to be
using a decimal unit, so they'll equivalent to 32 kB/32000 bytes.
go-units API is missing a method which would parse "32kB" as 32000 bytes, and "32kiB" as 32768 bytes. FromHumanSize() parses both as 32000 bytes, while RAMInBytes() parses both as 32768 bytes.
This commit introduces a FromSize method a more litteral parsing of the unit is needed. Modifiers without a unit ('32k') will be assumed to be using a decimal unit, so they'll equivalent to 32 kB/32000 bytes.
This fixes https://github.com/docker/go-units/issues/31