in internal/objectstore/objectstore.go [194:206]
func (o *ObjectStore) GetObjectAs(instanceID string, typ reflect.Type) (value reflect.Value, found bool) {
found = false
if values, exists := o.idToObjects[instanceID]; exists {
for value = range values {
if value.Type().AssignableTo(typ) {
value = value.Convert(typ)
found = true
return
}
}
}
return
}