Skip to content

Commit 7bc49ba

Browse files
authored
Add support to clone gitee codes to the ws dir (#35)
1 parent 00dd84f commit 7bc49ba

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

main.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,12 @@ func parseShortCode(args []string) []string {
6969
args = append(args, path.Join(strings.ReplaceAll(viper.GetString("ws"), "github", "gitee"),
7070
strings.ReplaceAll(address, "gitee.com", "")))
7171
}
72+
} else if strings.HasPrefix(address, "https://gitee.com/") {
73+
if len(args) == 2 {
74+
args = append(args, path.Join(strings.ReplaceAll(viper.GetString("ws"), "github", "gitee"),
75+
strings.ReplaceAll(address, "https://gitee.com/", "")))
76+
}
77+
7278
} else if !strings.HasPrefix(address, "http") && !strings.HasPrefix(address, "git@") {
7379
args[1] = fmt.Sprintf("https://github.com.cnpmjs.org/%s", address)
7480

0 commit comments

Comments
 (0)