cmd

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2024 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const CommitTemplateWorningMessage = `` /* 517-byte string literal not displayed */

Variables

View Source
var ShimMap = map[string]string{
	"git-add-coauthor":      "git-mob coauthors add",
	"git-delete-coauthor":   "git-mob coauthors delete",
	"git-edit-coauthor":     "git-mob coauthors edit",
	"git-mob-print":         "git-mob print",
	"git-mob-version":       "git-mob version",
	"git-solo":              "git-mob solo",
	"git-suggest-coauthors": "git-mob coauthors suggest",
}

ShimMap stores the mapping of helper scripts to the equivalent git-mob subcommands; this mapping is used to auto-generate shim scripts and enable simpler syntax for calling these subcommands as if they were their own git plugins

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 NewCmdCoauthorsAdd added in v0.7.0

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

func NewCmdCoauthorsDelete added in v0.7.0

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

func NewCmdCoauthorsEdit added in v0.7.0

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

func NewCmdCoauthorsSuggest

func NewCmdCoauthorsSuggest(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 NewCmdMobRehash added in v0.7.3

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

func NewCmdMobUninstall added in v0.7.3

func NewCmdMobUninstall(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 CoauthorsAddOptions added in v0.7.0

type CoauthorsAddOptions struct {
	*printers.PrinterOptions
	AllCoAuthorsByInitials map[string]authors.Author
	Author                 authors.Author
	AuthorInitials         string
}

func NewCoauthorsAddOptions added in v0.7.0

func NewCoauthorsAddOptions(s printers.IOStreams) *CoauthorsAddOptions

func (*CoauthorsAddOptions) Complete added in v0.7.0

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

Complete the options

func (*CoauthorsAddOptions) Run added in v0.7.0

func (o *CoauthorsAddOptions) Run() error

Run the command

func (*CoauthorsAddOptions) Validate added in v0.7.0

func (o *CoauthorsAddOptions) Validate() error

Validate the options

type CoauthorsDeleteOptions added in v0.7.0

type CoauthorsDeleteOptions struct {
	*printers.PrinterOptions
	AllCoAuthorsByInitials map[string]authors.Author
	AuthorInitials         string
}

func NewCoauthorsDeleteOptions added in v0.7.0

func NewCoauthorsDeleteOptions(s printers.IOStreams) *CoauthorsDeleteOptions

func (*CoauthorsDeleteOptions) Complete added in v0.7.0

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

Complete the options

func (*CoauthorsDeleteOptions) Run added in v0.7.0

func (o *CoauthorsDeleteOptions) Run() error

Run the command

func (*CoauthorsDeleteOptions) Validate added in v0.7.0

func (o *CoauthorsDeleteOptions) Validate() error

Validate the options

type CoauthorsEditOptions added in v0.7.0

type CoauthorsEditOptions struct {
	*printers.PrinterOptions
	AllCoAuthorsByInitials map[string]authors.Author
	AuthorEmail            string
	AuthorInitials         string
	AuthorName             string
}

func NewCoauthorsEditOptions added in v0.7.0

func NewCoauthorsEditOptions(s printers.IOStreams) *CoauthorsEditOptions

func (*CoauthorsEditOptions) Complete added in v0.7.0

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

Complete the options

func (*CoauthorsEditOptions) Run added in v0.7.0

func (o *CoauthorsEditOptions) Run() error

Run the command

func (*CoauthorsEditOptions) Validate added in v0.7.0

func (o *CoauthorsEditOptions) Validate() error

Validate the options

type CoauthorsSuggestOptions

type CoauthorsSuggestOptions struct {
	*printers.PrinterOptions
	IncludeAll                 bool
	CurrentCoAuthorsByInitials map[string]authors.Author
	Filter                     string
}

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 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
	PrintCoauthorsFilePath   bool
	PrintVersion             bool
	OverrideAuthorByInitials string
	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 MobRehashOptions added in v0.7.3

type MobRehashOptions struct {
	*printers.PrinterOptions
}

func NewMobRehashOptions added in v0.7.3

func NewMobRehashOptions(s printers.IOStreams) *MobRehashOptions

func (*MobRehashOptions) Complete added in v0.7.3

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

Complete the options

func (*MobRehashOptions) Run added in v0.7.3

func (o *MobRehashOptions) Run() error

Run the command

func (*MobRehashOptions) Validate added in v0.7.3

func (o *MobRehashOptions) 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