Export cmd/config commands so they can be composed more easily

This commit is contained in:
Phillip Wittrock
2020-01-13 10:03:18 -08:00
parent 936dd090e6
commit 2fc340db62

View File

@@ -43,6 +43,26 @@ Advanced Documentation Topics:
`,
}
// Export commands publicly for composition
var (
Cat = commands.CatCommand
Count = commands.CountCommand
CreateSetter = commands.CreateSetterCommand
Fmt = commands.FmtCommand
Grep = commands.GrepCommand
ListSetters = commands.ListSettersCommand
Merge = commands.MergeCommand
Merge3 = commands.Merge3Command
RunFn = commands.RunFnCommand
Set = commands.SetCommand
Sink = commands.SinkCommand
Source = commands.SourceCommand
Tree = commands.TreeCommand
StackOnError = &commands.StackOnError
ExitOnError = &commands.ExitOnError
)
// NewConfigCommand returns a new *cobra.Command for the config command group. This may
// be embedded into other go binaries as a way of packaging the "config" command as part
// of another binary.