Skip to content

Commit 0dde81a

Browse files
author
Karan Goel
committed
fix merge conflict
2 parents 95634a2 + 5d0906f commit 0dde81a

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

joe.go

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,21 +110,23 @@ func main() {
110110
Name: "ls",
111111
Aliases: []string{"list"},
112112
Usage: "list all available files",
113-
Action: func(c *cli.Context) {
113+
Action: func(c *cli.Context) error {
114114
availableGitignores, err := availableFiles()
115115
if err != nil {
116116
log.Fatal(err)
117+
return err
117118
}
118119
fmt.Printf("%d supported .gitignore files:\n", len(availableGitignores))
119120
sort.Strings(availableGitignores)
120121
fmt.Printf("%s\n", strings.Join(availableGitignores, ", "))
122+
return nil
121123
},
122124
},
123125
{
124126
Name: "u",
125127
Aliases: []string{"update"},
126128
Usage: "update all available gitignore files",
127-
Action: func(c *cli.Context) {
129+
Action: func(c *cli.Context) error {
128130
fmt.Println("Updating gitignore files..")
129131
err := RemoveContents(dataPath)
130132
if err != nil {
@@ -133,19 +135,22 @@ func main() {
133135
err = DownloadFiles(gitignoreUrl, dataPath)
134136
if err != nil {
135137
log.Fatal(err)
138+
return err
136139
}
140+
return nil
137141
},
138142
},
139143
{
140144
Name: "g",
141145
Aliases: []string{"generate"},
142146
Usage: "generate gitignore files",
143-
Action: func(c *cli.Context) {
147+
Action: func(c *cli.Context) error {
144148
if c.NArg() != 1 {
145149
cli.ShowAppHelp(c)
146150
} else {
147151
generate(c.Args()[0])
148152
}
153+
return nil
149154
},
150155
},
151156
}

0 commit comments

Comments
 (0)