package diff
Import Path
github.com/andreyvit/diff (on go.dev)
Dependency Relation
imports 3 packages, and imported by one package
Involved Source Files
diff.go
diff provides quick and easy string diffing functions based on github.com/sergi/go-diff, mainly for diffing strings in tests
trim.go
Package-Level Type Names (only one, which is unexported)
Package-Level Functions (total 8, in which 5 are exported)
CharacterDiff returns an inline diff between the two strings, using (++added++) and (~~deleted~~) markup.
LineDiff returns a normal linewise diff between the two given strings.
LineDiffAsLines returns the lines of a linewise diff between the two given strings.
TrimLines applies TrimSpace to each string in the given array.
TrimLinesInString applies TrimSpace to each line in the given string, and returns the new trimmed string. Empty lines are not removed.
The pages are generated with Golds v0.3.2. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @Go100and1 (reachable from the left QR code) to get the latest news of Golds. |