Marshaling structs to command line arguments

38 views
Skip to first unread message

James Pettyjohn

unread,
Sep 11, 2019, 2:38:22 PM9/11/19
to golang-nuts
Hi,

While not the most likely of scenarios, I'm having to write a lot of integration around existing command line tools and want a better way then passing strings/constants around.

While there are ample choices to go from command line arguments to structs etc, I'm not finding anything besides vanilla os/exec for command line construction.

Most encoding packagers go from a struct or the like and generate marshal the serialized item. Anyone seen this same thing but making an array of args consumable by exec?

- J
Reply all
Reply to author
Forward
0 new messages