Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions diff.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ var excludeSubDirs = []string{
// and an error. It compares the files in the two directories (excluding subdirectories
// specified in the excludeSubDirs variable) and checks if they are equal. If a file is
// modified, its path is added to the updated slice.
// @todo update name and description as new behavior was added. Re-use better compare utils.
func GetDiffFiles(dirA, dirB string) ([]string, error) {
updated, err := compareDirectories(dirA, dirB, excludeSubDirs)
return updated, err
Expand All @@ -44,6 +45,8 @@ func compareDirectories(dirA, dirB string, excludeSubDirs []string) ([]string, e
for f := range filesInDirA {
_, found := filesInDirB[f]
if !found {
// If file was added or removed consider it as potential resource change.
updated = append(updated, f)
continue
}
fileA := filepath.Join(dirA, f)
Expand Down