2020-12-10 22:36:58 +00:00
|
|
|
package sshutil
|
|
|
|
|
|
|
|
import (
|
|
|
|
"regexp"
|
|
|
|
)
|
|
|
|
|
2020-12-11 05:19:39 +00:00
|
|
|
var gitSSHRegex = regexp.MustCompile("^[a-zA-Z0-9-_]+@[a-zA-Z0-9-.]+:.*$")
|
2020-12-10 22:36:58 +00:00
|
|
|
|
2021-01-04 19:07:28 +00:00
|
|
|
func IsImplicitSSHTransport(s string) bool {
|
2020-12-10 22:36:58 +00:00
|
|
|
return gitSSHRegex.MatchString(s)
|
|
|
|
}
|