Skip to content

Commit ffa53f3

Browse files
committed
fix: Fix lint issues
1 parent af72bb8 commit ffa53f3

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

internal/reposync/repo_handler.go

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,13 @@ import (
44
"context"
55
"errors"
66
"fmt"
7-
"github.com/cli/go-gh"
8-
"github.com/rm3l/gh-org-repo-sync/internal/cli"
9-
"github.com/rm3l/gh-org-repo-sync/internal/github"
107
"log"
118
"os"
129
"path/filepath"
10+
11+
"github.com/cli/go-gh"
12+
"github.com/rm3l/gh-org-repo-sync/internal/cli"
13+
"github.com/rm3l/gh-org-repo-sync/internal/github"
1314
)
1415

1516
// CloneProtocol indicates the Git protocol to use for cloning.
@@ -75,13 +76,14 @@ func HandleRepository(
7576

7677
func clone(output, organization string, repository string, protocol CloneProtocol) error {
7778
var repoUrl string
78-
if protocol == SystemProtocol {
79+
switch protocol {
80+
case SystemProtocol:
7981
repoUrl = fmt.Sprintf("%s/%s", organization, repository)
80-
} else if protocol == SSHProtocol {
82+
case SSHProtocol:
8183
repoUrl = fmt.Sprintf("[email protected]:%s/%s.git", organization, repository)
82-
} else if protocol == HTTPSProtocol {
84+
case HTTPSProtocol:
8385
repoUrl = fmt.Sprintf("https://github.com/%s/%s.git", organization, repository)
84-
} else {
86+
default:
8587
return fmt.Errorf("unknown protocol for cloning: %s", protocol)
8688
}
8789
repoPath, err := safeAbsPath(output)

0 commit comments

Comments
 (0)