fq
fq copied to clipboard
Apple Binary Property List Enhancement: Timestamps
Per @wader 's comment in the original PR, it would be nice to add an option for bplist decoding to display time values as timestamps instead of just CocoaDate floating point values in torepr
/tovalue
representations (and maybe elsewhere?).
Is there guidance or a good reference commit somewhere that shows how to add decode options for specific formats?
Not at the moment, should add something. But it should no more than add a *In
struct to format.go
with "doc" struct field tags, there is also *Out
struct:s for decoder who output, not that common. Then in the decoders decode.Format
struct fill in the DecodeInArg
field with default values and add a type assert for the in
arg in the decode function, hope that is all. Maybe mp3.go
is a good example. After that the rest of fq's code should take care of help texts and make it possible pass the option in a object to the decode function (key as snake_case).
About what to name the options there no conventions yet, try come up with something an will see how it feels.