Skip to content

Commit ac49fb5

Browse files
committed
Updated CLI's help information
1 parent 2e245f6 commit ac49fb5

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

pkg/cmd/cli.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@ type CobraInterface struct {
1616

1717
func (cmd *CobraInterface) setRootCommand() {
1818
cmd.RootCmd = &cobra.Command{
19-
Short: "Short",
20-
Long: "Long",
19+
Short: "Application to search duplicate files inside a folder",
2120
}
2221
}
2322

@@ -26,17 +25,18 @@ func (cmd *CobraInterface) setVersion() {
2625
Use: "version",
2726
Short: "Print app version",
2827
Run: func(c *cobra.Command, arg []string) {
29-
fmt.Print("v0.0.1")
28+
fmt.Print("v0.1.0")
3029
},
3130
}
3231
cmd.RootCmd.AddCommand(version)
3332
}
3433

3534
func (cmd *CobraInterface) setStart() {
3635
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",
4040
Run: func(c *cobra.Command, args []string) {
4141
cmd.RootFolder = args[0]
4242
},

pkg/main.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,8 @@ import (
88
func main() {
99
cobra := new(cmd.CobraInterface)
1010
cobra.Execute()
11+
if cobra.RootFolder == "" {
12+
return
13+
}
1114
core.Start(*cobra)
1215
}

0 commit comments

Comments
 (0)