overdue
This commit is contained in:
11
.rclone_repo/vendor/github.com/pengsrc/go-shared/check/host.go
generated
vendored
Executable file
11
.rclone_repo/vendor/github.com/pengsrc/go-shared/check/host.go
generated
vendored
Executable file
@@ -0,0 +1,11 @@
|
||||
package check
|
||||
|
||||
import (
|
||||
"regexp"
|
||||
)
|
||||
|
||||
// HostAndPort checks whether a string contains host and port.
|
||||
// It returns true if matched.
|
||||
func HostAndPort(hostAndPort string) bool {
|
||||
return regexp.MustCompile(`^[^:]+:[0-9]+$`).MatchString(hostAndPort)
|
||||
}
|
||||
Reference in New Issue
Block a user