Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ReposCmd = &cobra.Command{ Use: "repos", Short: "Bulk create repos if not exist (skip if exist)", Run: func(cmd *cobra.Command, args []string) { cfg := utils.LoadConfig() repos := utils.ReadRepositoryYaml(utils.InputFile) svc := api.NewRepoService(cfg, utils.ProjectKey) var wg sync.WaitGroup sem := make(chan struct{}, 5) for _, repo := range repos { wg.Add(1) go func(r models.RepoEntity) { defer wg.Done() sem <- struct{}{} defer func() { <-sem }() svc.Create(repo) }(repo) } wg.Wait() }, }
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.