diff options
-rw-r--r-- | cmp/report_text.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/cmp/report_text.go b/cmp/report_text.go index 80605d0..0353b50 100644 --- a/cmp/report_text.go +++ b/cmp/report_text.go @@ -19,6 +19,11 @@ var randBool = rand.New(rand.NewSource(time.Now().Unix())).Intn(2) == 0 type indentMode int func (n indentMode) appendIndent(b []byte, d diffMode) []byte { + // The output of Diff is documented as being unstable to provide future + // flexibility in changing the output for more humanly readable reports. + // This logic intentionally introduces instability to the exact output + // so that users can detect accidental reliance on stability early on, + // rather than much later when an actual change to the format occurs. if flags.Deterministic || randBool { // Use regular spaces (U+0020). switch d { |