google / google/go-cmp

question: have diff output ignore additions

Open
#318 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
4.7k
Forks
243
PR merge metrics
No merged PRs in 30d

Description

From https://github.com/google/go-cmp/blob/v0.5.9/cmp/compare.go#L113
> Diff returns a human-readable report of the differences between two values:
// y - x. ...
> func Diff(x, y interface{}, opts ...Option)

Is there a way to ignore things added in`y` in the output? I realize I could post process the diff output and drop lines with `+` but without the preceeding `-` but wondering if there's a better way.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.