diff --git a/cli/common/command_builder.go b/cli/common/command_builder.go new file mode 100644 index 00000000..3d984043 --- /dev/null +++ b/cli/common/command_builder.go @@ -0,0 +1,82 @@ +package common + +import "github.com/spf13/cobra" + +type diveCommandBuilder struct { + cmd *cobra.Command +} + +func NewDiveCommandBuilder() *diveCommandBuilder { + return &diveCommandBuilder{ + cmd: &cobra.Command{}, + } +} + +// AddCommand adds a subcommand to the command. +func (d *diveCommandBuilder) AddCommand(cmd *cobra.Command) CommandBuilder { + panic("not implemented") // TODO: Implement +} + +// Add Persistent Bool Flag +func (d *diveCommandBuilder) AddBoolPersistentFlag(p *bool, name string, value bool, usage string) CommandBuilder { + panic("not implemented") // TODO: Implement +} + +// Add Persistent Bool Flag with Short hand +func (d *diveCommandBuilder) AddBoolPersistentFlagWithShortHand(p *bool, name string, value bool, usage string, shorthand string) CommandBuilder { + panic("not implemented") // TODO: Implement +} + +// Add Persistent String Flag +func (d *diveCommandBuilder) AddStringPersistentFlag(p *string, name string, value string, usage string) CommandBuilder { + panic("not implemented") // TODO: Implement +} + +// Add Persistent String Flag with Short hand +func (d *diveCommandBuilder) AddStringPersistentFlagWithShortHand(p *string, name string, shorthand string, value string, usage string) CommandBuilder { + panic("not implemented") // TODO: Implement +} + +// Add StringFlag adds a string flag to the command that persists +func (d *diveCommandBuilder) AddStringFlag(name string, value string, usage string) CommandBuilder { + panic("not implemented") // TODO: Implement +} + +// Add StringFlag adds a string flag to the command that persists with short hand +func (d *diveCommandBuilder) AddStringFlagWithShortHand(p *string, name string, shorthand string, value string, usage string) CommandBuilder { + panic("not implemented") // TODO: Implement +} + +// Add BooFlag adds a boolean flag to the command that persists +func (d *diveCommandBuilder) AddBoolFlag(name string, value bool, usage string) CommandBuilder { + panic("not implemented") // TODO: Implement +} + +func (d *diveCommandBuilder) AddBoolFlagWithShortHand(name string, shorthand string, value bool, usage string) CommandBuilder { + panic("not implemented") // TODO: Implement +} + +// Build constructs and returns the Cobra command. +func (d *diveCommandBuilder) Build() *cobra.Command { + panic("not implemented") // TODO: Implement +} + +// SetUse sets the Use field of the command. +func (d *diveCommandBuilder) SetUse(use string) CommandBuilder { + panic("not implemented") // TODO: Implement +} + +// SetShort sets the Short field of the command. +func (d *diveCommandBuilder) SetShort(short string) CommandBuilder { + panic("not implemented") // TODO: Implement +} + +// SetLong sets the Long field of the command. +func (d *diveCommandBuilder) SetLong(long string) CommandBuilder { + panic("not implemented") // TODO: Implement +} + +// SetRun sets the Run field of the command. +func (d *diveCommandBuilder) SetRun(run func(cmd *cobra.Command, args []string)) CommandBuilder { + panic("not implemented") // TODO: Implement +} diff --git a/cli/common/interfaces.go b/cli/common/interfaces.go index 6ed54d8c..72614cba 100644 --- a/cli/common/interfaces.go +++ b/cli/common/interfaces.go @@ -56,17 +56,17 @@ type CommandBuilder interface { // AddCommand adds a subcommand to the command. AddCommand(cmd *cobra.Command) CommandBuilder - // Add Persistant Bool Flag - AddBoolPersistantFlag(p *bool, name string, value bool, usage string) CommandBuilder + // Add Persistent Bool Flag + AddBoolPersistentFlag(p *bool, name string, value bool, usage string) CommandBuilder - // Add Persistant Bool Flag with Short hand - AddBoolPersistantFlagWithShortHand(p *bool, name string, value bool, usage string, shorthand string) CommandBuilder + // Add Persistent Bool Flag with Short hand + AddBoolPersistentFlagWithShortHand(p *bool, name string, value bool, usage string, shorthand string) CommandBuilder - // Add Persistant String Flag - AddStringPersistantFlag(p *string, name string, value string, usage string) CommandBuilder + // Add Persistent String Flag + AddStringPersistentFlag(p *string, name string, value string, usage string) CommandBuilder - // Add Persistant String Flag with Short hand - AddStringPersistantFlagWithShortHand(p *string, name string, shorthand string, value string, usage string) CommandBuilder + // Add Persistent String Flag with Short hand + AddStringPersistentFlagWithShortHand(p *string, name string, shorthand string, value string, usage string) CommandBuilder // Add StringFlag adds a string flag to the command that persists AddStringFlag(name string, value string, usage string) CommandBuilder