Skip to content

Diffing embedded structs and slices causes the tag name to be lost. #117

@kom0055

Description

@kom0055

Diffing embedded structs and slices causes the tag name to be lost.

type A struct {

	Field1 struct {
		Field2 string  `diff:"F1"`
	} `diff:"F2"`
}

when i use diff, i see embedded Field2 will lose tag F2. Cause new differ in method struct value does not copy tag name, so tagname is lost

func (d *Differ) structValues(t string, path []string, a reflect.Value) error {
	var nd Differ
	nd.Filter = d.Filter
	nd.customValueDiffers = d.customValueDiffers

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions