11# sumdiff
22Compare sdk/tools for directory and files.
33
4+ ## Features
5+ - [x] Support comparing files or directories result is equals.
6+ - [x] Supports comparing files or directories with the difference list.
7+ - [x] Support for calculating the hash of a file or directories md5/sha1/sha256/sha512.
8+ - [x] This library supports both SDK and CLI tools.
9+ - [x] CLI support result format : table/json/csv/yaml
10+ - [x] CLI support result output to a file.
11+
412# SDK
513
614## Install
@@ -12,38 +20,42 @@ go get -u github.com/foolin/sumdiff
1220``` go
1321
1422// Compare
15- ok , result , err := Cmp (path1, path2)
23+ ok , result , err := sumdiff. Cmp (path1, path2)
1624
1725// Equal
18- ok , err := Equal (v.path1 , v.path2 )
26+ ok , err := sumdiff. Equal (v.path1 , v.path2 )
1927
2028```
2129
2230# CLI Tool
2331
2432```
2533sumdiff --help
34+
2635A useful comparison tool for differences and hash
2736
2837Usage:
2938 sumdiff [command]
3039
3140Available Commands:
32- eq Compare whether two files or directory are equal
3341 cmp Compare the two files or directories are different
42+ completion Generate the autocompletion script for the specified shell
43+ eq Compare whether two files or directory are equal
3444 hash Calculate hash algorithm [md5|sha1|sha256|sha512] hex string
3545 help Help about any command
3646 md5 Calculate md5 hex string
3747 sha1 Calculate sha1 hex string
3848 sha256 Calculate sha256 hex string
39- completion Generate the autocompletion script for the specified shell
40-
49+
4150Flags:
42- -h, --help help for sumdiff
43- -v, --verbose Verbose output info
51+ -f, --format string Format: table|json|csv|yaml (default "table")
52+ -h, --help help for sumdiff
53+ -o, --output string Output filename
54+ -v, --verbose Verbose output info
4455
4556Use "sumdiff [command] --help" for more information about a command.
4657
58+
4759```
4860
4961# Usage
@@ -58,7 +70,11 @@ Use "sumdiff [command] --help" for more information about a command.
5870 ```
5971 Output1:
6072 ` ` ` text
61- true
73+ +--------+
74+ | result |
75+ +--------+
76+ | true |
77+ +--------+
6278 ` ` `
6379
6480 Example2:
@@ -174,9 +190,4 @@ linux:
174190
175191tar -xvf sumdiff_Linux_x86_64.tar.gz && sudo mv sumdiff /usr/local/bin
176192
177- ` ` `
178-
179- # # TODO
180- - [ ] Output table,csv,yaml,json
181- - [ ] Config display statusbar
182- - [ ] Write file or console
193+ ` ` `
0 commit comments