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
TL;DR: We should pass a boolean value to loadFromEntity to indicate whether the property is required (true) or optional (false). Currently the function is implemented as if everything it is asked to load is required.
If this new parameter is optional/false and the property name is not in the map, we should return the default value of the type and a nil error.
Lastly, instead of using true/false at call sites, @perdasilva suggested we define constants (perhaps required, optional = true, false), and then use the constant at call sites to make it more obvious what the semantics of the boolean value are.
The text was updated successfully, but these errors were encountered:
Uh oh!
There was an error while loading. Please reload this page.
See https://kubernetes.slack.com/archives/C0181L6JYQ2/p1675349508746979
TL;DR: We should pass a boolean value to
loadFromEntity
to indicate whether the property is required (true
) or optional (false
). Currently the function is implemented as if everything it is asked to load is required.If this new parameter is optional/false and the property name is not in the map, we should return the default value of the type and a nil error.
Lastly, instead of using
true
/false
at call sites, @perdasilva suggested we define constants (perhapsrequired, optional = true, false
), and then use the constant at call sites to make it more obvious what the semantics of the boolean value are.The text was updated successfully, but these errors were encountered: