Skip to content

Commit f391cc1

Browse files
committed
Merge pull request #294 from beanieboi/alphabetic-command-order
reorder cli commands to be alphabetic ordered
2 parents c25f6fa + 5d49321 commit f391cc1

1 file changed

Lines changed: 44 additions & 44 deletions

File tree

exercism/main.go

Lines changed: 44 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -19,21 +19,21 @@ const (
1919
// lot of things get out of hand.
2020
Version = "2.2.4"
2121

22-
descDebug = "Outputs useful debug information."
2322
descConfigure = "Writes config values to a JSON file."
23+
descDebug = "Outputs useful debug information."
24+
descDownload = "Downloads a solution given the ID of the latest iteration."
2425
descFetch = "Fetches the next unsubmitted problem in each track."
26+
descList = "Lists the available problems for a language track, given its ID."
27+
descOpen = "Opens exercism.io to your most recent iteration of a problem given the track ID and problem slug."
2528
descRestore = "Downloads the most recent iteration for each of your solutions on exercism.io."
26-
descSubmit = "Submits a new iteration to a problem on exercism.io."
2729
descSkip = "Skips a problem given a track ID and problem slug."
28-
descUpgrade = "Upgrades the CLI to the latest released version."
29-
descTracks = "Lists the available language tracks."
30-
descOpen = "Opens exercism.io to your most recent iteration of a problem given the track ID and problem slug."
31-
descDownload = "Downloads a solution given the ID of the latest iteration."
32-
descList = "Lists the available problems for a language track, given its ID."
3330
descStatus = "Fetches information about your progress with a given language track."
31+
descSubmit = "Submits a new iteration to a problem on exercism.io."
32+
descTracks = "Lists the available language tracks."
33+
descUpgrade = "Upgrades the CLI to the latest released version."
3434

35-
descLongRestore = "Restore will pull the latest revisions of exercises that have already been submitted. It will *not* overwrite existing files. If you have made changes to a file and have not submitted it, and you're trying to restore the last submitted version, first move that file out of the way, then call restore."
3635
descLongDownload = "The submission ID is the last part of the URL when looking at a solution on exercism.io."
36+
descLongRestore = "Restore will pull the latest revisions of exercises that have already been submitted. It will *not* overwrite existing files. If you have made changes to a file and have not submitted it, and you're trying to restore the last submitted version, first move that file out of the way, then call restore."
3737
)
3838

3939
func main() {
@@ -61,11 +61,6 @@ func main() {
6161
},
6262
}
6363
app.Commands = []cli.Command{
64-
{
65-
Name: "debug",
66-
Usage: descDebug,
67-
Action: cmd.Debug,
68-
},
6964
{
7065
Name: "configure",
7166
Usage: descConfigure,
@@ -89,12 +84,36 @@ func main() {
8984
},
9085
Action: cmd.Configure,
9186
},
87+
{
88+
Name: "debug",
89+
Usage: descDebug,
90+
Action: cmd.Debug,
91+
},
92+
{
93+
Name: "download",
94+
ShortName: "dl",
95+
Usage: descDownload,
96+
Description: descLongDownload,
97+
Action: cmd.Download,
98+
},
9299
{
93100
Name: "fetch",
94101
ShortName: "f",
95102
Usage: descFetch,
96103
Action: cmd.Fetch,
97104
},
105+
{
106+
Name: "list",
107+
ShortName: "li",
108+
Usage: descList,
109+
Action: cmd.List,
110+
},
111+
{
112+
Name: "open",
113+
ShortName: "op",
114+
Usage: descOpen,
115+
Action: cmd.Open,
116+
},
98117
{
99118
Name: "restore",
100119
ShortName: "r",
@@ -107,6 +126,12 @@ func main() {
107126
Usage: descSkip,
108127
Action: cmd.Skip,
109128
},
129+
{
130+
Name: "status",
131+
ShortName: "st",
132+
Usage: descStatus,
133+
Action: cmd.Status,
134+
},
110135
{
111136
Name: "submit",
112137
ShortName: "s",
@@ -123,6 +148,12 @@ func main() {
123148
},
124149
},
125150
},
151+
{
152+
Name: "tracks",
153+
ShortName: "t",
154+
Usage: descTracks,
155+
Action: cmd.Tracks,
156+
},
126157
{
127158
Name: "unsubmit",
128159
ShortName: "u",
@@ -136,37 +167,6 @@ func main() {
136167
Usage: descUpgrade,
137168
Action: cmd.Upgrade,
138169
},
139-
{
140-
Name: "tracks",
141-
ShortName: "t",
142-
Usage: descTracks,
143-
Action: cmd.Tracks,
144-
},
145-
{
146-
Name: "open",
147-
ShortName: "op",
148-
Usage: descOpen,
149-
Action: cmd.Open,
150-
},
151-
{
152-
Name: "download",
153-
ShortName: "dl",
154-
Usage: descDownload,
155-
Description: descLongDownload,
156-
Action: cmd.Download,
157-
},
158-
{
159-
Name: "list",
160-
ShortName: "li",
161-
Usage: descList,
162-
Action: cmd.List,
163-
},
164-
{
165-
Name: "status",
166-
ShortName: "st",
167-
Usage: descStatus,
168-
Action: cmd.Status,
169-
},
170170
}
171171
if err := app.Run(os.Args); err != nil {
172172
log.Fatal(err)

0 commit comments

Comments
 (0)