cmd

package
v0.6.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 12, 2022 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var GitMobPluginMap = map[string]string{
	"git-mob-print":         "git-mob print",
	"git-mob-version":       "git-mob version",
	"git-solo":              "git-mob solo",
	"git-suggest-coauthors": "git-mob coauthors suggest",
}

Functions

func Execute

func Execute()

Execute builds the default root command and invokes it with os.Args

func NewCmdCoauthors

func NewCmdCoauthors(s printers.IOStreams) *cobra.Command

func NewCmdCoauthorsSuggest

func NewCmdCoauthorsSuggest(s printers.IOStreams) *cobra.Command

func NewCmdExplode

func NewCmdExplode(s printers.IOStreams) *cobra.Command

func NewCmdImplode

func NewCmdImplode(s printers.IOStreams) *cobra.Command

func NewCmdMob

func NewCmdMob(s printers.IOStreams) *cobra.Command

func NewCmdMobHooks

func NewCmdMobHooks(s printers.IOStreams) *cobra.Command

func NewCmdMobInit

func NewCmdMobInit(ioStreams printers.IOStreams) *cobra.Command

func NewCmdMobInitAll added in v0.5.0

func NewCmdMobInitAll(ioStreams printers.IOStreams) *cobra.Command

func NewCmdMobPrepareCommitMsg

func NewCmdMobPrepareCommitMsg(s printers.IOStreams) *cobra.Command

func NewCmdPrint

func NewCmdPrint(s printers.IOStreams) *cobra.Command

func NewCmdSolo

func NewCmdSolo(s printers.IOStreams) *cobra.Command

func NewCmdVersion

func NewCmdVersion(s printers.IOStreams) *cobra.Command

func NewRootCmd

func NewRootCmd(s printers.IOStreams) *cobra.Command

NewRootCmd creates the 'root' command and configures it's nested children

Types

type CoauthorsSuggestOptions

type CoauthorsSuggestOptions struct {
	*printers.PrinterOptions
}

func NewCoauthorsSuggestOptions

func NewCoauthorsSuggestOptions(s printers.IOStreams) *CoauthorsSuggestOptions

func (*CoauthorsSuggestOptions) Complete

func (o *CoauthorsSuggestOptions) Complete(cmd *cobra.Command, args []string) error

Complete the options

func (*CoauthorsSuggestOptions) Run

func (o *CoauthorsSuggestOptions) Run() error

Run the command

func (*CoauthorsSuggestOptions) Validate

func (o *CoauthorsSuggestOptions) Validate() error

Validate the options

type ExplodeOptions

type ExplodeOptions struct {
	*printers.PrinterOptions
}

func NewExplodeOptions

func NewExplodeOptions(s printers.IOStreams) *ExplodeOptions

func (*ExplodeOptions) Complete

func (o *ExplodeOptions) Complete(cmd *cobra.Command, args []string) error

Complete the options

func (*ExplodeOptions) Run

func (o *ExplodeOptions) Run() error

Run the command

func (*ExplodeOptions) Validate

func (o *ExplodeOptions) Validate() error

Validate the options

type ImplodeOptions

type ImplodeOptions struct {
	*printers.PrinterOptions
}

func NewImplodeOptions

func NewImplodeOptions(s printers.IOStreams) *ImplodeOptions

func (*ImplodeOptions) Complete

func (o *ImplodeOptions) Complete(cmd *cobra.Command, args []string) error

Complete the options

func (*ImplodeOptions) Run

func (o *ImplodeOptions) Run() error

Run the command

func (*ImplodeOptions) Validate

func (o *ImplodeOptions) Validate() error

Validate the options

type InitOneResult added in v0.5.0

type InitOneResult struct {
	FolderPath string `json:"folder_path"`
	HookPath   string `json:"hook_path"`
	Error      error  `json:"error,omitempty"`
}

type MobInitAllOptions added in v0.5.0

type MobInitAllOptions struct {
	*printers.PrinterOptions
	BasePath string
	DryRun   bool
}

func NewMobInitAllOptions added in v0.5.0

func NewMobInitAllOptions(s printers.IOStreams) *MobInitAllOptions

func (*MobInitAllOptions) Complete added in v0.5.0

func (o *MobInitAllOptions) Complete(cmd *cobra.Command, args []string) error

Complete the options

func (*MobInitAllOptions) Run added in v0.5.0

func (o *MobInitAllOptions) Run() error

Run the command

func (*MobInitAllOptions) Validate added in v0.5.0

func (o *MobInitAllOptions) Validate() error

Validate the options

type MobInitOptions

type MobInitOptions struct {
	*printers.PrinterOptions
}

func NewMobInitOptions

func NewMobInitOptions(s printers.IOStreams) *MobInitOptions

func (*MobInitOptions) Complete

func (o *MobInitOptions) Complete(cmd *cobra.Command, args []string) error

Complete the options

func (*MobInitOptions) Run

func (o *MobInitOptions) Run() error

Run the command

func (*MobInitOptions) Validate

func (o *MobInitOptions) Validate() error

Validate the options

type MobOptions

type MobOptions struct {
	*printers.PrinterOptions
	Initials               []string
	ListOnly               bool
	PrintMob               bool
	PrintVersion           bool
	CurrentGitUser         *authors.Author
	AllCoAuthorsByInitials map[string]authors.Author
}

func NewMobOptions

func NewMobOptions(s printers.IOStreams) *MobOptions

func (*MobOptions) Complete

func (o *MobOptions) Complete(cmd *cobra.Command, args []string) error

Complete the options

func (*MobOptions) Run

func (o *MobOptions) Run() error

Run the command

func (*MobOptions) Validate

func (o *MobOptions) Validate() error

Validate the options

type MobPrepareCommitMsgOptions

type MobPrepareCommitMsgOptions struct {
	*printers.PrinterOptions

	// 1-3 positional args provided by git
	CommitMessageFile string
	Source            gitMessage.Source // optional
	CommitObject      string            // optional (required when Source is CommitSource)

	RawArgs []string
}

func NewMobPrepareCommitMsgOptions

func NewMobPrepareCommitMsgOptions(s printers.IOStreams) *MobPrepareCommitMsgOptions

func (*MobPrepareCommitMsgOptions) Complete

func (o *MobPrepareCommitMsgOptions) Complete(cmd *cobra.Command, args []string) error

Complete the options

func (*MobPrepareCommitMsgOptions) Run

Run the command

func (*MobPrepareCommitMsgOptions) Validate

func (o *MobPrepareCommitMsgOptions) Validate() error

Validate the options

type PrintOptions

type PrintOptions struct {
	*printers.PrinterOptions
	printers.IOStreams
	VersionDetails *version.DetailStruct
	InitialsOnly   bool
}

func NewPrintOptions

func NewPrintOptions(s printers.IOStreams) *PrintOptions

func (*PrintOptions) Complete

func (o *PrintOptions) Complete(cmd *cobra.Command, args []string) error

Complete the options

func (*PrintOptions) Run

func (o *PrintOptions) Run() error

Run the command

func (*PrintOptions) Validate

func (o *PrintOptions) Validate() error

Validate the options

type SoloOptions

type SoloOptions struct {
	*printers.PrinterOptions
}

func NewSoloOptions

func NewSoloOptions(s printers.IOStreams) *SoloOptions

func (*SoloOptions) Complete

func (o *SoloOptions) Complete(cmd *cobra.Command, args []string) error

Complete the options

func (*SoloOptions) Run

func (o *SoloOptions) Run() error

Run the command

func (*SoloOptions) Validate

func (o *SoloOptions) Validate() error

Validate the options

type VersionOptions

type VersionOptions struct {
	*printers.PrinterOptions
	VersionDetails *version.DetailStruct
}

func NewVersionOptions

func NewVersionOptions(s printers.IOStreams) *VersionOptions

func (*VersionOptions) Complete

func (o *VersionOptions) Complete(cmd *cobra.Command, args []string) error

Complete the options

func (*VersionOptions) Run

func (o *VersionOptions) Run() error

Run the command

func (*VersionOptions) Validate

func (o *VersionOptions) Validate() error

Validate the options

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL