44 "flag"
55 "fmt"
66 "github.com/rm3l/gh-org-repo-sync/internal/github"
7- "github.com/rm3l/gh-org-repo-sync/internal/repo_sync "
7+ "github.com/rm3l/gh-org-repo-sync/internal/reposync "
88 "log"
99 "os"
1010 "strings"
@@ -36,9 +36,9 @@ Example: "language:Go stars:>10 pushed:>2010-11-12"
3636See https://bit.ly/3HurHe3 for more details on the search syntax` )
3737 flag .IntVar (& batchSize , "batch-size" , defaultBatchSize ,
3838 "the number of elements to retrieve at once. Must not exceed 100" )
39- flag .StringVar (& protocol , "protocol" , string (repo_sync .SystemProtocol ),
40- fmt .Sprintf ("the protocol to use for cloning. Possible values: %s, %s, %s." , repo_sync .SystemProtocol ,
41- repo_sync .SSHProtocol , repo_sync .HTTPSProtocol ))
39+ flag .StringVar (& protocol , "protocol" , string (reposync .SystemProtocol ),
40+ fmt .Sprintf ("the protocol to use for cloning. Possible values: %s, %s, %s." , reposync .SystemProtocol ,
41+ reposync .SSHProtocol , reposync .HTTPSProtocol ))
4242 flag .StringVar (& output , "output" , "." , "the output path" )
4343 flag .Usage = func () {
4444 //goland:noinspection GoUnhandledErrorResult
@@ -63,7 +63,7 @@ See https://bit.ly/3HurHe3 for more details on the search syntax`)
6363 batchSize )
6464 os .Exit (1 )
6565 }
66- cloneProtocol := repo_sync .CloneProtocol (strings .ToLower (protocol ))
66+ cloneProtocol := reposync .CloneProtocol (strings .ToLower (protocol ))
6767
6868 repositories , err := github .GetOrganizationRepos (organization , query , batchSize )
6969 if err != nil {
@@ -80,7 +80,7 @@ See https://bit.ly/3HurHe3 for more details on the search syntax`)
8080 for _ , repository := range repositories {
8181 go func (repo github.RepositoryInfo ) {
8282 defer wg .Done ()
83- err := repo_sync .HandleRepository (dryRun , output , organization , repo , cloneProtocol )
83+ err := reposync .HandleRepository (dryRun , output , organization , repo , cloneProtocol )
8484 if err != nil {
8585 log .Println ("[warn] an error occurred while handling repo" , repo , err )
8686 }
0 commit comments