From 64b4901eb04e5e468a1f89c6821320a1840edb47 Mon Sep 17 00:00:00 2001 From: Christian Schwarz Date: Sat, 2 Sep 2017 12:52:12 +0200 Subject: [PATCH] cmd test: dump config using pretty printer --- cmd/test.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cmd/test.go b/cmd/test.go index 1cf3345..f6a2433 100644 --- a/cmd/test.go +++ b/cmd/test.go @@ -3,6 +3,7 @@ package cmd import ( "os" + "github.com/kr/pretty" "github.com/spf13/cobra" "github.com/zrepl/zrepl/zfs" ) @@ -14,7 +15,7 @@ var testCmd = &cobra.Command{ var testConfigSyntaxCmd = &cobra.Command{ Use: "config", - Short: "test if config file can be parsed", + Short: "parse config file and dump parsed datastructure", Run: doTestConfig, } @@ -33,6 +34,9 @@ func init() { func doTestConfig(cmd *cobra.Command, args []string) { log.Printf("config ok") + + log.Printf("%# v", pretty.Formatter(conf)) + return }