(out io.Writer, indent string)
| 297 | } |
| 298 | |
| 299 | func (o *Output) print(out io.Writer, indent string) error { |
| 300 | e := json.NewEncoder(out) |
| 301 | e.SetIndent(indent, "\t") |
| 302 | err := e.Encode(o) |
| 303 | if err != nil { |
| 304 | return fmt.Errorf("marshal json: %w", err) |
| 305 | } |
| 306 | |
| 307 | return nil |
| 308 | } |
| 309 | |
| 310 | // Outputs is an array of Output |
| 311 | type Outputs []*Output |