m-lab / go

General purpose libraries / APIs for use in mlab code.
Apache License 2.0
5 stars 6 forks source link

Flagx datatypes are initialized differently from native types #42

Open pboothe opened 5 years ago

pboothe commented 5 years ago

Do we want to unify them, so code would look like:

  datatypes := flagx.StringArray("datatype", "Help text")

instead of the two-stage init that they currently require?

pboothe commented 5 years ago

The right solution is to define the datatypes in their own package (like bytecount is) but to create the methods flagx.ByteCount and flagx.ByteCountVar in the flagx package. This means that we need to create those methods for bytecount, and we need to move FileBytes to a filebytes package and then create those two methods for it as well.