You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently Rudi works only/best with pure map[string]any, generic datastructures. However it would be nice if one could also just use any kind of Go struct, similar to how Go templates also allow to access fields in structs using reflection.
Structs can of course contain pointer fields and those must be taken care of separately, as most funtions in Rudi do not take pointers (like concat), but Rudi also offers no language elements to dereference a pointer, nor do I intend to add such language elements. My plan is to automatically dereference pointers when evaluating a JSON path, so that if a field is nil, nil is returned, otherwise the dereferenced value.
In general, pointers are discouraged in Rudi and can lead to many hard to troubleshoot side effects. Support for them is on a best effort basis.
The text was updated successfully, but these errors were encountered:
Currently Rudi works only/best with pure
map[string]any
, generic datastructures. However it would be nice if one could also just use any kind of Go struct, similar to how Go templates also allow to access fields in structs using reflection.Structs can of course contain pointer fields and those must be taken care of separately, as most funtions in Rudi do not take pointers (like
concat
), but Rudi also offers no language elements to dereference a pointer, nor do I intend to add such language elements. My plan is to automatically dereference pointers when evaluating a JSON path, so that if a field is nil, nil is returned, otherwise the dereferenced value.In general, pointers are discouraged in Rudi and can lead to many hard to troubleshoot side effects. Support for them is on a best effort basis.
The text was updated successfully, but these errors were encountered: