Open freakytoad1 opened 2 months ago
I like the default output of the .Diff() function but would love more lines of context around the differences. After looking through different examples, I can't figure out how to do this. Digging into the code of cmp, it looks like the context is hardcoded to 2 https://github.com/google/go-cmp/blob/c3ad8435e7bef96af35732bc0789e5a2278c6d5f/cmp/report_compare.go#L13
.Diff()
cmp
2
Is there a way to override this value?
I like the default output of the
.Diff()
function but would love more lines of context around the differences. After looking through different examples, I can't figure out how to do this. Digging into the code ofcmp
, it looks like the context is hardcoded to2
https://github.com/google/go-cmp/blob/c3ad8435e7bef96af35732bc0789e5a2278c6d5f/cmp/report_compare.go#L13Is there a way to override this value?