4
4
"flag"
5
5
"fmt"
6
6
"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 "
8
8
"log"
9
9
"os"
10
10
"strings"
@@ -36,9 +36,9 @@ Example: "language:Go stars:>10 pushed:>2010-11-12"
36
36
See https://bit.ly/3HurHe3 for more details on the search syntax` )
37
37
flag .IntVar (& batchSize , "batch-size" , defaultBatchSize ,
38
38
"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 ))
42
42
flag .StringVar (& output , "output" , "." , "the output path" )
43
43
flag .Usage = func () {
44
44
//goland:noinspection GoUnhandledErrorResult
@@ -63,7 +63,7 @@ See https://bit.ly/3HurHe3 for more details on the search syntax`)
63
63
batchSize )
64
64
os .Exit (1 )
65
65
}
66
- cloneProtocol := repo_sync .CloneProtocol (strings .ToLower (protocol ))
66
+ cloneProtocol := reposync .CloneProtocol (strings .ToLower (protocol ))
67
67
68
68
repositories , err := github .GetOrganizationRepos (organization , query , batchSize )
69
69
if err != nil {
@@ -80,7 +80,7 @@ See https://bit.ly/3HurHe3 for more details on the search syntax`)
80
80
for _ , repository := range repositories {
81
81
go func (repo github.RepositoryInfo ) {
82
82
defer wg .Done ()
83
- err := repo_sync .HandleRepository (dryRun , output , organization , repo , cloneProtocol )
83
+ err := reposync .HandleRepository (dryRun , output , organization , repo , cloneProtocol )
84
84
if err != nil {
85
85
log .Println ("[warn] an error occurred while handling repo" , repo , err )
86
86
}
0 commit comments