Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Commit = &cobra.Command{ Use: "commit", Aliases: []string{"c"}, Short: "Commit and push changes to the remote repository", Run: func(cmd *cobra.Command, args []string) { all, err := cmd.Flags().GetBool("all") xerr.ExitIfError(err) push, err := cmd.Flags().GetBool("push") xerr.ExitIfError(err) interactive, err := cmd.Flags().GetBool("interactive") xerr.ExitIfError(err) if all { repositories := slice_utils.Keys(cfg.Configuration().Git) for _, repository := range repositories { clog.UnderlineF("Checking {{ %s | blue }}", repository) golang.UpdateGo(repository) git.CommitDirectory(repository, interactive) if push { err := git.Push(repository) if err != nil { clog.Error(repository, "\n", err.Error()) } else { clog.Infof("{{ Up to date with remote | green }}") } } } } else { directory := shell.CurrentDirectory() golang.UpdateGo(directory) git.CommitDirectory(directory, interactive) if push { err := git.Push(directory) if err != nil { clog.Error(directory, "\n", err.Error()) } else { clog.Infof("{{ Up to date with remote | green }}") } } } }, }
View Source
var Git = &cobra.Command{ Use: "git", Aliases: []string{"g"}, }
View Source
var Ignore = &cobra.Command{ Use: "ignore", Short: "Create .gitignore file for the current directory", Run: func(cmd *cobra.Command, args []string) { git.GitignoreCreate(".") }, }
View Source
var Scan = &cobra.Command{ Use: "scan", Short: "Scan for git repositories", Run: func(cmd *cobra.Command, args []string) { clog.Info("{{Scanning for git repositories...|green}}") directory := shell.CurrentDirectory() git.Scan(directory) git.VerifyPaths() }, }
Functions ¶
func ActionOption ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.