Do computes the (line oriented) modifications needed to turn the src string into the dst string. The underlying algorithm is Meyers, its complexity is O(N*d) where N is min(lines(src), lines(dst)) and d is the size of the diff.
(src, dst string)
| 18 | // its complexity is O(N*d) where N is min(lines(src), lines(dst)) and d |
| 19 | // is the size of the diff. |
| 20 | func Do(src, dst string) (diffs []diffmatchpatch.Diff) { |
| 21 | // the default timeout is time.Second which may be too small under heavy load |
| 22 | return DoWithTimeout(src, dst, time.Hour) |
| 23 | } |
| 24 | |
| 25 | // DoWithTimeout computes the (line oriented) modifications needed to turn the src |
| 26 | // string into the dst string. The `timeout` argument specifies the maximum |