Documentation
¶
Overview ¶
Package diff contains the CLI's diff implementation.
Reference: - https://github.com/aymanbagabas/go-udiff - https://www.gnu.org/software/diffutils/manual/html_node/Hunks.html - https://www.cloudbees.com/blog/git-diff-a-complete-comparison-tutorial-for-git
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExecSourceDiff ¶
func ExecSourceDiff(ctx context.Context, ru *run.Run, cfg *Config, elems *Elements, handle1, handle2 string, ) error
ExecSourceDiff diffs handle1 and handle2.
Types ¶
type Config ¶
type Config struct {
// Lines specifies the number of lines of context surrounding a diff.
Lines int
// RecordWriterFn is a factory function that returns
// an output.RecordWriter used to generate diff text
// when comparing table data.
RecordWriterFn output.NewRecordWriterFunc
}
Config contains parameters to control diff behavior.
type Elements ¶
type Elements struct {
// Overview compares a summary of the sources.
Overview bool
// DBProperties compares DB properties.
DBProperties bool
// Schema compares table/schema structure.
Schema bool
// RowCount compares table row count when comparing schemata.
RowCount bool
// Data compares each row in a table. Caution: this can be slow.
Data bool
}
Elements determines what source elements to compare.
Directories
¶
| Path | Synopsis |
|---|---|
|
internal
|
|
|
go-udiff
Package diff computes differences between text files or strings.
|
Package diff computes differences between text files or strings. |
|
go-udiff/_examples/apply
command
|
|
|
go-udiff/_examples/changes
command
|
|
|
go-udiff/_examples/hello-world
command
|
|
|
go-udiff/difftest
Package difftest supplies a set of tests that will operate on any implementation of a diff algorithm as exposed by diff "github.com/neilotoole/sq/cli/diff/internal/go-udiff"
|
Package difftest supplies a set of tests that will operate on any implementation of a diff algorithm as exposed by diff "github.com/neilotoole/sq/cli/diff/internal/go-udiff" |
|
go-udiff/lcs
package lcs contains code to find longest-common-subsequences (and diffs)
|
package lcs contains code to find longest-common-subsequences (and diffs) |
|
go-udiff/myers
Package myers implements the Myers diff algorithm.
|
Package myers implements the Myers diff algorithm. |
Click to show internal directories.
Click to hide internal directories.