MCPcopy Create free account
hub / github.com/cogentcore/core / Dump

Method Dump

texteditor/difflib/bytes/bytes.go:663–677  ·  view source on GitHub ↗
(tag []byte, x [][]byte, low int, high int)

Source from the content-addressed store, hash-verified

661}
662
663func (d *Differ) Dump(tag []byte, x [][]byte, low int, high int) (out [][]byte) {
664 // Generate comparison results for a same-tagged range.
665 sout := d.StructuredDump(tag[0], x, low, high)
666 out = make([][]byte, len(sout))
667 var bld bytes.Buffer
668 bld.Grow(1024)
669 for i, line := range sout {
670 bld.Reset()
671 bld.WriteByte(line.Tag)
672 bld.Write(SPACE)
673 bld.Write(line.Line)
674 out[i] = append(out[i], bld.Bytes()...)
675 }
676 return out
677}
678
679func (d *Differ) PlainReplace(a [][]byte, alo int, ahi int, b [][]byte, blo int, bhi int) (out [][]byte, err error) {
680 if !(alo < ahi) || !(blo < bhi) { // assertion

Callers 4

TestDifferDumpFunction · 0.95
CompareMethod · 0.95
PlainReplaceMethod · 0.95
fancyHelperMethod · 0.95

Calls 4

StructuredDumpMethod · 0.95
WriteMethod · 0.65
ResetMethod · 0.45
BytesMethod · 0.45

Tested by 1

TestDifferDumpFunction · 0.76