Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Files ¶
type Files struct {
From, To *Version
}
Files is a compound handle for multiple directories and files that shall be compared using a diff program. This is similar to how `kubectl diff` works. This should behave similarly (e.g., create files in two different directories) as some external diff tools might have some heuristic detections in places, e.g., see dyff: https://github.com/homeport/dyff/blame/c382d5132c86d2280335f4cb71754ab20776a85a/internal/cmd/root.go#L85-L98
type Program ¶
type Program interface { // Run executes the diff program to compare the given files. Run(a, b string) error }
Program is a diff program that compares two files.
func NewProgram ¶
func NewProgram(streams genericiooptions.IOStreams) Program
NewProgram returns kubectl's default Program implementation that respects the KUBECTL_EXTERNAL_DIFF environment variable. It falls back to `diff -u -N` if the env var is unset.
type Version ¶ added in v0.2.0
type Version struct {
Dir string
}
Version is a handle for a directory that can hold multiple files of a single version to compare.
func NewVersion ¶ added in v0.2.0
NewVersion creates a temporary directory.