So the following fails because the size format defaults to iec π
β― go run main.go --into size 2500000M
val size
format size
input 2500000M
direction into
(bool) false
(*errors.errorString)(0xc00008e260)(Unknown unit suffix)
into into
true
Output Err: Input unparsable for `size`
Which makes total sense but it would be nice if this thing knew that I wanted "SI" units and just didn't specify that.
There may be a bit of a chicken and egg scenario here given that the units are set before the parsers are ran. This format (size) may be a good candidate to break the mold with in that perhaps it should should figure which struct to instantiate based on which parser runs successfully
Looks like the GetParsers method is not being used yet and perhaps this use case was the reason I included it in the first place ... lol π€·
So the following fails because the
sizeformat defaults toiecπWhich makes total sense but it would be nice if this thing knew that I wanted "SI" units and just didn't specify that.
There may be a bit of a chicken and egg scenario here given that the units are set before the parsers are ran. This format (size) may be a good candidate to break the mold with in that perhaps it should should figure which struct to instantiate based on which parser runs successfully
Looks like the
GetParsersmethod is not being used yet and perhaps this use case was the reason I included it in the first place ... lol π€·