13 lines
236 B
Go
13 lines
236 B
Go
package repocli
|
|
|
|
import (
|
|
"regexp"
|
|
)
|
|
|
|
const uuidRegex = `^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$`
|
|
|
|
func isUUID(src string) bool {
|
|
re := regexp.MustCompile(uuidRegex)
|
|
return re.MatchString(src)
|
|
}
|