Documentation
¶
Overview ¶
Package cmd implements verious git-repo subcommands using cobra as the command-line framework.
Root command is defined in `cmd/root.go`, it implements public options for git-repo. Such as: --asume-yes, --quiet, --single.
Each subcommand has a corresponding file, named `cmd/<subcmd>.go`, and the entrance of each subcommand is is defined in function `Execute(args)`.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Response ¶
type Response struct { // Err contains error returned from the subcommand executed. Err error // Cmd contains the command object. Cmd *cobra.Command }
Response wraps error for subcommand, and is returned from cmd package.
func Execute ¶
func Execute() Response
Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.
func (Response) IsUserError ¶
IsUserError indicates it is a user fault, and should display the command usage in addition to displaying the error itself.
type WorkSpaceCommand ¶
type WorkSpaceCommand struct { MirrorOK bool SingleOK bool // contains filtered or unexported fields }
WorkSpaceCommand implements load of workspace
func (*WorkSpaceCommand) ReloadRepoWorkSpace ¶
func (v *WorkSpaceCommand) ReloadRepoWorkSpace() *workspace.RepoWorkSpace
ReloadRepoWorkSpace will reload workspace
func (*WorkSpaceCommand) RepoWorkSpace ¶
func (v *WorkSpaceCommand) RepoWorkSpace() *workspace.RepoWorkSpace
RepoWorkSpace loads workspace and return RepoWorkSpace object
func (*WorkSpaceCommand) WorkSpace ¶
func (v *WorkSpaceCommand) WorkSpace() workspace.WorkSpace
WorkSpace loads workspace and return WorkSpace object