Initial commit

This commit is contained in:
lash
2025-01-12 08:17:29 +00:00
commit ded01e8dd0
5 changed files with 73 additions and 0 deletions

15
identity/alias.go Normal file
View File

@@ -0,0 +1,15 @@
package identity
import (
"regexp"
)
const (
aliasRegex = `^[a-zA-Z0-9]+$`
)
// IsValidAlias checks if the alias is a valid alias format
func IsValidAlias(alias string) bool {
match, _ := regexp.MatchString(aliasRegex, alias)
return match
}