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
the result of diffing these types always ends up with an empty changelog, even if there are differences on the keys
after digging a bit through the codebase I've realized that the structValues method won't add any entry to the changelog if the struct has no fields; when diffing maps, for a specific key, if any of the maps doesn't have a value for that key, there is a shortcut that simply returns the output of structValues as either create or delete depending which map is missing the data
this, effectively makes the changelog to be empty for the following case
a:=Set{"existing": struct{}}
b:=Set{}
The text was updated successfully, but these errors were encountered:
aexvir
changed the title
no differences reported for maps where only keys have value
no differences reported for maps where values are empty structs
Mar 8, 2023
in a case where there is a type defined such as
the result of diffing these types always ends up with an empty changelog, even if there are differences on the keys
after digging a bit through the codebase I've realized that the
structValues
method won't add any entry to the changelog if the struct has no fields; when diffing maps, for a specific key, if any of the maps doesn't have a value for that key, there is a shortcut that simply returns the output ofstructValues
as either create or delete depending which map is missing the datathis, effectively makes the changelog to be empty for the following case
The text was updated successfully, but these errors were encountered: