Documentation ¶
Index ¶
Constants ¶
View Source
const ModuleName = "tools.star"
View Source
const Name = "tools"
Variables ¶
View Source
var Module = &starlarkstruct.Module{ Name: "tools", Members: starlark.StringDict{ "diff": localctx.AddBuiltin("tools.diff", DiffOfStr), }, }
Functions ¶
func PPDiff ¶
PPDiff returns the results of diffing left and right as an pretty printed string. It will display all the lines of both the sequences that are being compared. When the left is different from right it will prepend a " - |" before the line. When the right is different from left it will prepend a " + |" before the line. When the right and left are equal it will prepend a " |" before the line.
Types ¶
type DiffRecord ¶
func Diff ¶
func Diff(seq1, seq2 []string) (diff []DiffRecord)
Diff returns the result of diffing the seq1 and seq2.
func (DiffRecord) String ¶
func (d DiffRecord) String() string
String returns a string representation of d. The string is a concatenation of the delta type and the payload.
Click to show internal directories.
Click to hide internal directories.