Skip to content

Commit db0e226

Browse files
author
Chief
committed
Add numeric username support for SSH urls.
Signed-off-by: Chief <[email protected]>
1 parent 3e42b8c commit db0e226

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

internal/url/url.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66

77
var (
88
isSchemeRegExp = regexp.MustCompile(`^[^:]+://`)
9-
scpLikeUrlRegExp = regexp.MustCompile(`^(?:(?P<user>[^@]+)@)?(?P<host>[^:\s]+):(?:(?P<port>[0-9]{1,5})/)?(?P<path>[^\\].*)$`)
9+
scpLikeUrlRegExp = regexp.MustCompile(`^(?:(?P<user>[^@]+)@)?(?P<host>[^:\s]+):(?:(?P<port>[0-9]{1,5})(?:\/|:))?(?P<path>[^\\].*\/[^\\].*)$`)
1010
)
1111

1212
// MatchesScheme returns true if the given string matches a URL-like

0 commit comments

Comments
 (0)