Compare focused inspection views
This commit is contained in:
@@ -39,6 +39,18 @@ func (i Inspection) HistoricalPaths() []Path {
|
||||
// writer errors can leave partial output.
|
||||
func (i Inspection) WriteEffective(output io.Writer) error { return i.view.WriteEffective(output) }
|
||||
|
||||
// Diff compares frozen views at the same canonical scope, including differences
|
||||
// at an ancestor when the existing comparison treats that ancestor atomically.
|
||||
// Views may come from different root Go types. Unavailable or mismatched views
|
||||
// return an error without records.
|
||||
func (i Inspection) Diff(other Inspection) ([]Difference, error) {
|
||||
values, err := i.view.Diff(other.view)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return fromEngineDifferences(values), nil
|
||||
}
|
||||
|
||||
// Sources returns the full detached source catalog.
|
||||
func (i Inspection) Sources() []SourceInfo {
|
||||
values := i.view.Inspection().Sources()
|
||||
|
||||
Reference in New Issue
Block a user