mirror of
https://github.com/hanzo-fi/stack.git
synced 2026-10-30 20:34:43 +00:00
13 lines
259 B
Go
13 lines
259 B
Go
package accounts
|
|
|
|
import "regexp"
|
|
|
|
const SegmentRegex = "[a-zA-Z0-9_-]+"
|
|
const Pattern = "^" + SegmentRegex + "(:" + SegmentRegex + ")*$"
|
|
|
|
var Regexp = regexp.MustCompile(Pattern)
|
|
|
|
func ValidateAddress(addr string) bool {
|
|
return Regexp.Match([]byte(addr))
|
|
}
|