mirror of https://github.com/golang/go.git
LineEdits has similar consistency preconditions to ApplyEdits. Previously they were assumed, and bad input would create bad output or crashes; now it uses the same validation logic as ApplyEdits. Since it reports an error, computation of a unified diff can also fail if the edits are inconsistent. The ToUnified([]Edit) function now returns an error. For convenience we also provide a wrapper (Unified) that cannot fail since it calls Strings and ToUnified consistently. LineEdits itself is now private. Change-Id: I3780827f501d7d5c9665ec8be5656331c0dcda8e Reviewed-on: https://go-review.googlesource.com/c/tools/+/440175 Reviewed-by: Robert Findley <rfindley@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Run-TryBot: Alan Donovan <adonovan@google.com> Auto-Submit: Alan Donovan <adonovan@google.com> |
||
|---|---|---|
| .. | ||
| difftest.go | ||
| difftest_test.go | ||