Skip to content

Conversation

@aexvir
Copy link

@aexvir aexvir commented Mar 8, 2023

closes #100

to address this issue I've added an eager return inside structValues that, if the struct has no fields, appends a single entry to the changelog for the struct itself; also added tests for this

wants, got := Set{"one": {}}, Set{} 
diff.Diff(wants, got)

diff.Changelog{
	diff.Change{
		Type: diff.DELETE,
		Path: []string{"one"},
		From: struct{}{},
		To: nil,
	},
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

no differences reported for maps where values are empty structs

1 participant