mirror of
https://github.com/hanzo-fi/stack.git
synced 2026-10-30 20:34:43 +00:00
Co-authored-by: Antoine Wacheux <[email protected]> Co-authored-by: Maxence Maireaux <[email protected]> Co-authored-by: Brieuc Caillot <[email protected]>
14 lines
232 B
Go
14 lines
232 B
Go
package ledger
|
|
|
|
import (
|
|
"regexp"
|
|
)
|
|
|
|
const AssetPattern = `[A-Z][A-Z0-9]{0,16}(\/\d{1,6})?`
|
|
|
|
var AssetRegexp = regexp.MustCompile("^" + AssetPattern + "$")
|
|
|
|
func AssetIsValid(v string) bool {
|
|
return AssetRegexp.Match([]byte(v))
|
|
}
|