add Get method to model registry

This commit is contained in:
parent 15d032459a
commit 53e23bb52a
Signed by: tablet
GPG Key ID: 924A5F6AF051E87C

@ -234,6 +234,14 @@ func (r TModelRegistry) new_(n string) interface{} {
return nil
}
func (r TModelRegistry) Get(name string) *Model {
model, ok := r[name]
if !ok {
return nil
}
return model
}
// Model registers models in the ModelRegistry, where
// they can be accessed via a model's struct name
func (r TModelRegistry) Model(mdl ...any) {