go-pagerduty icon indicating copy to clipboard operation
go-pagerduty copied to clipboard

Ability to use Command line tool PD to do all

Open zerolaser opened this issue 3 years ago • 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 ?

zerolaser avatar Sep 10 '22 22:09 zerolaser

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?

jsleeio avatar Feb 08 '24 07:02 jsleeio

PR: https://github.com/PagerDuty/go-pagerduty/pull/513

jsleeio avatar Feb 08 '24 09:02 jsleeio