Skip to content

Commit

Permalink
Add numeric username support for SSH urls.
Browse files Browse the repository at this point in the history
Signed-off-by: Chief <admin@117.sh>
  • Loading branch information
Chief committed Aug 28, 2019
1 parent 3e42b8c commit db0e226
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/url/url.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (

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

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

0 comments on commit db0e226

Please sign in to comment.