cli / go-gh

A Go module for interacting with gh and the GitHub API from the command line.
https://pkg.go.dev/github.com/cli/go-gh/v2
MIT License
322 stars 45 forks source link

jsonpretty should not add new lines if not indenting #109

Closed heaths closed 1 year ago

heaths commented 1 year ago

https://github.com/cli/go-gh/blob/09213117cf60973e9d69fb5201b2643e5f1ec11b/pkg/jsonpretty/format.go#L55

Seems if indent == "" when passed to jsonpretty.Format, output should not be formatted at all i.e., delimiters - []{}, - should not have a newline appended.