bridge/debug: refactor

Move the debug command out of vaa.go in preparation for adding
additional comments.
Change-Id: Id387eace5d488952331f5d7f16c43b235676df24
This commit is contained in:
Leo 2021-03-08 21:24:43 +01:00 committed by Hendrik Hofstadt
parent a3ed2fbd72
commit b04dd1cc2f
2 changed files with 12 additions and 9 deletions

12
bridge/cmd/debug/debug.go Normal file
View File

@ -0,0 +1,12 @@
package debug
import "github.com/spf13/cobra"
var DebugCmd = &cobra.Command{
Use: "debug",
Short: "Debugging utilities",
}
func init() {
DebugCmd.AddCommand(decodeVaaCmd)
}

View File

@ -9,11 +9,6 @@ import (
"strings"
)
var DebugCmd = &cobra.Command{
Use: "debug",
Short: "Debugging utilities",
}
var decodeVaaCmd = &cobra.Command{
Use: "decode-vaa [DATA]",
Short: "Decode a hex-encoded VAA",
@ -34,7 +29,3 @@ var decodeVaaCmd = &cobra.Command{
}
},
}
func init() {
DebugCmd.AddCommand(decodeVaaCmd)
}