Documentation
¶
Overview ¶
Package diff provides utilities for comparing package versions.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CompareResult ¶
type CompareResult struct {
Files []FileDiff `json:"files"`
TotalAdded int `json:"total_added"`
TotalDeleted int `json:"total_deleted"`
FilesChanged int `json:"files_changed"`
FilesAdded int `json:"files_added"`
FilesDeleted int `json:"files_deleted"`
}
CompareResult contains the complete comparison between two versions.
type FileDiff ¶
type FileDiff struct {
Path string `json:"path"`
Type string `json:"type"` // "modified", "added", "deleted", "renamed"
OldPath string `json:"old_path,omitempty"`
Diff string `json:"diff,omitempty"`
IsBinary bool `json:"is_binary,omitempty"`
LinesAdded int `json:"lines_added"`
LinesDeleted int `json:"lines_deleted"`
}
FileDiff represents the diff for a single file.
Click to show internal directories.
Click to hide internal directories.