From 2de6ba028cef59bc78d7e611466a6920640f8b07 Mon Sep 17 00:00:00 2001 From: "jesse.tang" <1430482733@qq.com> Date: Fri, 14 Oct 2022 11:08:16 +0800 Subject: [PATCH] cleanup: update scpSyntaxRe regexp (#2444) --- cmd/kratos/internal/base/vcs_url.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/kratos/internal/base/vcs_url.go b/cmd/kratos/internal/base/vcs_url.go index ef76db30f..6d3aef12a 100644 --- a/cmd/kratos/internal/base/vcs_url.go +++ b/cmd/kratos/internal/base/vcs_url.go @@ -8,7 +8,7 @@ import ( ) var ( - scpSyntaxRe = regexp.MustCompile(`^([a-zA-Z0-9_]+)@([a-zA-Z0-9._-]+):(.*)$`) + scpSyntaxRe = regexp.MustCompile(`^(\w+)@([\w.-]+):(.*)$`) scheme = []string{"git", "https", "http", "git+ssh", "ssh", "file", "ftp", "ftps"} )