diff --git a/registry.go b/registry.go index 6c81e2c..ca59a53 100644 --- a/registry.go +++ b/registry.go @@ -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) {