type typeRegistry = map[string]Typ
Is a type alias. You cannot define methods on aliases (only on the original type--but in this case map[string]Typ
cannot have methods on it, so you're out of luck).
What you probably want is to create a custom type, not an alias:
type typeRegistry map[string]Typ
Then your methods will work.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…