File tree Expand file tree Collapse file tree 2 files changed +9
-6
lines changed Expand file tree Collapse file tree 2 files changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -16,8 +16,7 @@ type CobraInterface struct {
16
16
17
17
func (cmd * CobraInterface ) setRootCommand () {
18
18
cmd .RootCmd = & cobra.Command {
19
- Short : "Short" ,
20
- Long : "Long" ,
19
+ Short : "Application to search duplicate files inside a folder" ,
21
20
}
22
21
}
23
22
@@ -26,17 +25,18 @@ func (cmd *CobraInterface) setVersion() {
26
25
Use : "version" ,
27
26
Short : "Print app version" ,
28
27
Run : func (c * cobra.Command , arg []string ) {
29
- fmt .Print ("v0.0.1 " )
28
+ fmt .Print ("v0.1.0 " )
30
29
},
31
30
}
32
31
cmd .RootCmd .AddCommand (version )
33
32
}
34
33
35
34
func (cmd * CobraInterface ) setStart () {
36
35
start := & cobra.Command {
37
- Use : "start" ,
38
- Short : "Execute duplicate files searcher" ,
39
- Long : "Long description" ,
36
+ Use : "start" ,
37
+ Short : "Search for duplicated files" ,
38
+ Example : "start [rootFolder]" ,
39
+ Long : "This command receives a folder, find recursively and print all duplicate files inside this folder and his subfolderss" ,
40
40
Run : func (c * cobra.Command , args []string ) {
41
41
cmd .RootFolder = args [0 ]
42
42
},
Original file line number Diff line number Diff line change 8
8
func main () {
9
9
cobra := new (cmd.CobraInterface )
10
10
cobra .Execute ()
11
+ if cobra .RootFolder == "" {
12
+ return
13
+ }
11
14
core .Start (* cobra )
12
15
}
You can’t perform that action at this time.
0 commit comments