From 63c768bd4922a3014056803849d85447f04ecdc9 Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Sat, 21 Dec 2024 19:18:45 -0300 Subject: Combine "CompiledGrammar" and "Report" payloads Instead of one JSON file for each output, a single file with both outputs combined, each under its own key. The beauty of maps. Also instead of using a flag to determine where to put the data, just print to stdout and be done with it. --- src/urubu/cmd/vartan/show.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/urubu/cmd/vartan/show.go') diff --git a/src/urubu/cmd/vartan/show.go b/src/urubu/cmd/vartan/show.go index cab63a0..a7a8be9 100644 --- a/src/urubu/cmd/vartan/show.go +++ b/src/urubu/cmd/vartan/show.go @@ -40,13 +40,13 @@ func readReport(path string) (*spec.Report, error) { return nil, err } - report := &spec.Report{} - err = json.Unmarshal(d, report) + output := &spec.Output{} + err = json.Unmarshal(d, output) if err != nil { return nil, err } - return report, nil + return &output.Report, nil } const reportTemplate = `# Conflicts -- cgit v1.2.3