Skip to content

diffToJson could misprint CAS values #55

@nelio2k

Description

@nelio2k

The CAS values as uint64 below, when marshalled, can become inaccurate because uint64 could lose precision when marshalling to a map to be printed.

func (differ *FilesDiffer) diffToJson() ([]byte, error) {
	outputMap := map[string]interface{}{
		"Mismatch":          differ.BothExistButMismatch,
		"MissingFromSource": differ.MissingFromFile1,
		"MissingFromTarget": differ.MissingFromFile2,
	}

	ret, err := json.Marshal(outputMap)

	return ret, err
}

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