From b57d7b07ddb616bba15d49b7b01d4f2e64420762 Mon Sep 17 00:00:00 2001 From: Blallo Date: Wed, 19 Dec 2018 14:51:54 +0100 Subject: [PATCH] [formatting] better example output --- formatting/cmd/path2tree/main.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/formatting/cmd/path2tree/main.go b/formatting/cmd/path2tree/main.go index 80e1822..532ba0b 100644 --- a/formatting/cmd/path2tree/main.go +++ b/formatting/cmd/path2tree/main.go @@ -13,7 +13,9 @@ import ( func showExamples() { enc := json.NewEncoder(os.Stderr) for i, example := range examples { - fmt.Fprintf(os.Stderr, "\nExample %d:\n%s\n\n", i, example) + fmt.Fprintf(os.Stderr, "\nExample %d\n\nInput:\n\n", i) + formatting.PrettyPrint(example) + fmt.Fprintf(os.Stderr, "\nOutput:\n\n") formatting.EncodeJSON(example, enc) } }