Skip to content

Commit 05cc6d8

Browse files
committed
v.0.1.1: separated diff from printing to ease testing
1 parent 5a1f518 commit 05cc6d8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/json_diff/core.clj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@
77

88

99
(defn diff
10-
"prints diff between JSON files"
10+
"returns diff between JSON files"
1111
[fn1 fn2]
1212
(with-open [file1 (io/reader fn1)
1313
file2 (io/reader fn2)]
1414
(let [json1 (json/read file1)
1515
json2 (json/read file2)]
16-
(ddiff/pretty-print (ddiff/diff json1 json2)))))
16+
(ddiff/diff json1 json2))))
1717

1818
(defn -main
1919
"Main function"
@@ -22,4 +22,4 @@
2222
(println "Not enough parameters!")
2323
(let [fn1 (first args)
2424
fn2 (second args)]
25-
(diff fn1 fn2))))
25+
(ddiff/pretty-print (diff fn1 fn2)))))

0 commit comments

Comments
 (0)