PrintOutputJSON marshals the output into JSON and prints the JSON.
(output interface{})
| 255 | |
| 256 | // PrintOutputJSON marshals the output into JSON and prints the JSON. |
| 257 | func PrintOutputJSON(output interface{}) error { |
| 258 | b, err := json.Marshal(output) |
| 259 | if err != nil { |
| 260 | return err |
| 261 | } |
| 262 | fmt.Println(string(b)) |
| 263 | return nil |
| 264 | } |
| 265 | |
| 266 | // NewFormatter returns a new Formatter |
| 267 | func NewFormatter(printID bool) *Formatter { |
no outgoing calls
no test coverage detected