Skip to content
This repository was archived by the owner on Mar 27, 2024. It is now read-only.

Commit b2e31fb

Browse files
committed
Split lines prior to diffing
1 parent 392203e commit b2e31fb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

util/diff_utils.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,8 +167,8 @@ func DiffFile(image1, image2 *pkgutil.Image, filename string) (*FileNameDiff, er
167167
}
168168

169169
//Carry on with diffing, make string array for difflib requirements
170-
image1Contents := []string{string(*image1FileContents)}
171-
image2Contents := []string{string(*image2FileContents)}
170+
image1Contents := difflib.SplitLines(string(*image1FileContents))
171+
image2Contents := difflib.SplitLines(string(*image2FileContents))
172172

173173
//Run diff
174174
diff := difflib.UnifiedDiff{

0 commit comments

Comments
 (0)