mirror of
https://github.com/zrepl/zrepl.git
synced 2025-06-20 17:58:04 +02:00
cmd test: dump config using pretty printer
This commit is contained in:
parent
7e442ea0ea
commit
64b4901eb0
@ -3,6 +3,7 @@ package cmd
|
|||||||
import (
|
import (
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
|
"github.com/kr/pretty"
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
"github.com/zrepl/zrepl/zfs"
|
"github.com/zrepl/zrepl/zfs"
|
||||||
)
|
)
|
||||||
@ -14,7 +15,7 @@ var testCmd = &cobra.Command{
|
|||||||
|
|
||||||
var testConfigSyntaxCmd = &cobra.Command{
|
var testConfigSyntaxCmd = &cobra.Command{
|
||||||
Use: "config",
|
Use: "config",
|
||||||
Short: "test if config file can be parsed",
|
Short: "parse config file and dump parsed datastructure",
|
||||||
Run: doTestConfig,
|
Run: doTestConfig,
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -33,6 +34,9 @@ func init() {
|
|||||||
|
|
||||||
func doTestConfig(cmd *cobra.Command, args []string) {
|
func doTestConfig(cmd *cobra.Command, args []string) {
|
||||||
log.Printf("config ok")
|
log.Printf("config ok")
|
||||||
|
|
||||||
|
log.Printf("%# v", pretty.Formatter(conf))
|
||||||
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user