support some filtering
All checks were successful
Generate check / check-changes (pull_request) Successful in 28s
Quality / check-changes (pull_request) Successful in 3s
Generate check / verify-generate (pull_request) Has been skipped
Quality / run-tests (pull_request) Successful in 58s

This commit is contained in:
2026-05-16 09:09:39 +01:00
parent 4626f08b9c
commit adcd192cb9
7 changed files with 607 additions and 29 deletions

View File

@@ -15,8 +15,17 @@ const (
)
func (n Nature) String() string {
if n == "" {
return "unknown"
if n.Valid() {
return string(n)
}
return "unknown"
}
func (n Nature) Valid() bool {
switch n {
case NatureG01, NatureG20:
return true
default:
return false
}
return string(n)
}