| 643 | } |
| 644 | |
| 645 | func printJsonNoColor(decoded interface{}, stream ...io.Writer) { |
| 646 | var output bytes.Buffer |
| 647 | |
| 648 | buffer := new(bytes.Buffer) |
| 649 | encoder := json.NewEncoder(buffer) |
| 650 | encoder.SetEscapeHTML(false) |
| 651 | encoder.Encode(&decoded) |
| 652 | json.Indent(&output, buffer.Bytes(), "", " ") |
| 653 | |
| 654 | if len(stream) > 0 { |
| 655 | fmt.Fprintf(stream[0], "%s", string(output.Bytes())) |
| 656 | } else { |
| 657 | fmt.Fprintf(os.Stdout, "%s", string(output.Bytes())) |
| 658 | } |
| 659 | } |
| 660 | |
| 661 | func unpackGzip(inpath string, outpath string) error { |
| 662 | var exists bool |