func printJsonResults(results Results) error {
	data, err := json.MarshalIndent(results, "", "    ")
	if err != nil {
		return fmt.Errorf("Failed to convert results to JSON: %s", err.Error())
	}

	if _, err = io.Copy(os.Stdout, bytes.NewReader(data)); err != nil {
		return fmt.Errorf("Failed to write json output: %s", err.Error())
	}

	fmt.Print("\n")
	return nil
}
func printJsonResults(results Results) error {
	data, err := json.MarshalIndent(results, "", "    ")
	if err != nil {
		return fmt.Errorf("Failed to convert results to JSON: %s", err.Error())
	}

	if _, err = io.Copy(os.Stdout, bytes.NewReader(data)); err != nil {
		return fmt.Errorf("Failed to write json output: %s", err.Error())
	}

	fmt.Print("\n")
	return nil
}
func printJsonResults ( results Results ) error { data , err := json . MarshalIndent ( results , " " , " " ) if err != nil { return fmt . Errorf ( " " , err . Error ( ) ) } if _ , err = io . Copy ( os . Stdout , bytes . NewReader ( data ) ) ; err != nil { return fmt . Errorf ( " " , err . Error ( ) ) } fmt . Print ( " \n " ) return nil }
// printJsonResults prints json-formatted output for results
printJsonResults prints json - formatted output for results