instances-subcommand should be templated
skx opened this issue · comments
Steve Kemp commented
Right now the implementation of the sub-command contains things like this:
// details
fmt.Printf("\tAMI: %s\n", ami)
fmt.Printf("\tInstance type: %s\n", *instance.InstanceType)
if instance.KeyName != nil {
fmt.Printf("\tKey name: %s\n", *instance.KeyName)
}
This looks ugly, and is hard for users to modify. Instead of that define a golang text/template snippet and use a struct as appropriate to allow changing the formatting and included values. This could also pave the way towards a JSON-output option.