PagerDuty/go-pagerduty

Ability to use Command line tool PD to do all

Opened this issue · 2 comments

  1. Currently the pd service list only list 25 entries. Ability to loop all the entries via command line.
  2. Ability to print output as txt, json or csv.
  3. What's the debug option when running via commandline ?

I'm working on a PR for optional JSON support. I have it working for all commands but before I submit I'd like to understand why some of them use JSON and the rest use YAML.

My change introduces a Meta.Marshaler struct field which has a value of either yaml.Marshal or json.Marshal, and configures this via a global option. It seems to work nicely.

However ... if this change is merged, regardless of what the default output format is, it will break scripted pd usage. Even not having a default at all will break scripted pd usage because people will now need to configure it.

Maintainer people? What do you think?