@@ -33,7 +33,7 @@ func ExampleApp_Run() {
3333 app .UsageText = "app [first_arg] [second_arg]"
3434 app .Author = "Harrison"
3535 app .Email = "harrison@lolwut.com"
36- app .Authors = []Author {Author {Name : "Oliver Allen" , Email : "oliver@toyshop.com" }}
36+ app .Authors = []Author {{Name : "Oliver Allen" , Email : "oliver@toyshop.com" }}
3737 app .Run (os .Args )
3838 // Output:
3939 // Hello Jeremy
@@ -307,12 +307,12 @@ func TestApp_CommandWithNoFlagBeforeTerminator(t *testing.T) {
307307func TestApp_VisibleCommands (t * testing.T ) {
308308 app := NewApp ()
309309 app .Commands = []Command {
310- Command {
310+ {
311311 Name : "frob" ,
312312 HelpName : "foo frob" ,
313313 Action : func (_ * Context ) error { return nil },
314314 },
315- Command {
315+ {
316316 Name : "frib" ,
317317 HelpName : "foo frib" ,
318318 Hidden : true ,
@@ -517,7 +517,7 @@ func TestApp_BeforeFunc(t *testing.T) {
517517 }
518518
519519 app .Commands = []Command {
520- Command {
520+ {
521521 Name : "sub" ,
522522 Action : func (c * Context ) error {
523523 counts .Total ++
@@ -609,7 +609,7 @@ func TestApp_AfterFunc(t *testing.T) {
609609 }
610610
611611 app .Commands = []Command {
612- Command {
612+ {
613613 Name : "sub" ,
614614 Action : func (c * Context ) error {
615615 counts .Total ++
@@ -724,7 +724,7 @@ func TestApp_CommandNotFound(t *testing.T) {
724724 }
725725
726726 app .Commands = []Command {
727- Command {
727+ {
728728 Name : "bar" ,
729729 Action : func (c * Context ) error {
730730 counts .Total ++
@@ -791,7 +791,7 @@ func TestApp_OrderOfOperations(t *testing.T) {
791791
792792 app .After = afterNoError
793793 app .Commands = []Command {
794- Command {
794+ {
795795 Name : "bar" ,
796796 Action : func (c * Context ) error {
797797 counts .Total ++
@@ -1126,15 +1126,15 @@ func TestApp_Run_Categories(t *testing.T) {
11261126 app := NewApp ()
11271127 app .Name = "categories"
11281128 app .Commands = []Command {
1129- Command {
1129+ {
11301130 Name : "command1" ,
11311131 Category : "1" ,
11321132 },
1133- Command {
1133+ {
11341134 Name : "command2" ,
11351135 Category : "1" ,
11361136 },
1137- Command {
1137+ {
11381138 Name : "command3" ,
11391139 Category : "2" ,
11401140 },
@@ -1175,32 +1175,32 @@ func TestApp_VisibleCategories(t *testing.T) {
11751175 app := NewApp ()
11761176 app .Name = "visible-categories"
11771177 app .Commands = []Command {
1178- Command {
1178+ {
11791179 Name : "command1" ,
11801180 Category : "1" ,
11811181 HelpName : "foo command1" ,
11821182 Hidden : true ,
11831183 },
1184- Command {
1184+ {
11851185 Name : "command2" ,
11861186 Category : "2" ,
11871187 HelpName : "foo command2" ,
11881188 },
1189- Command {
1189+ {
11901190 Name : "command3" ,
11911191 Category : "3" ,
11921192 HelpName : "foo command3" ,
11931193 },
11941194 }
11951195
11961196 expected := []* CommandCategory {
1197- & CommandCategory {
1197+ {
11981198 Name : "2" ,
11991199 Commands : []Command {
12001200 app .Commands [1 ],
12011201 },
12021202 },
1203- & CommandCategory {
1203+ {
12041204 Name : "3" ,
12051205 Commands : []Command {
12061206 app .Commands [2 ],
@@ -1214,27 +1214,27 @@ func TestApp_VisibleCategories(t *testing.T) {
12141214 app = NewApp ()
12151215 app .Name = "visible-categories"
12161216 app .Commands = []Command {
1217- Command {
1217+ {
12181218 Name : "command1" ,
12191219 Category : "1" ,
12201220 HelpName : "foo command1" ,
12211221 Hidden : true ,
12221222 },
1223- Command {
1223+ {
12241224 Name : "command2" ,
12251225 Category : "2" ,
12261226 HelpName : "foo command2" ,
12271227 Hidden : true ,
12281228 },
1229- Command {
1229+ {
12301230 Name : "command3" ,
12311231 Category : "3" ,
12321232 HelpName : "foo command3" ,
12331233 },
12341234 }
12351235
12361236 expected = []* CommandCategory {
1237- & CommandCategory {
1237+ {
12381238 Name : "3" ,
12391239 Commands : []Command {
12401240 app .Commands [2 ],
@@ -1248,19 +1248,19 @@ func TestApp_VisibleCategories(t *testing.T) {
12481248 app = NewApp ()
12491249 app .Name = "visible-categories"
12501250 app .Commands = []Command {
1251- Command {
1251+ {
12521252 Name : "command1" ,
12531253 Category : "1" ,
12541254 HelpName : "foo command1" ,
12551255 Hidden : true ,
12561256 },
1257- Command {
1257+ {
12581258 Name : "command2" ,
12591259 Category : "2" ,
12601260 HelpName : "foo command2" ,
12611261 Hidden : true ,
12621262 },
1263- Command {
1263+ {
12641264 Name : "command3" ,
12651265 Category : "3" ,
12661266 HelpName : "foo command3" ,
@@ -1296,9 +1296,9 @@ func TestApp_Run_DoesNotOverwriteErrorFromBefore(t *testing.T) {
12961296func TestApp_Run_SubcommandDoesNotOverwriteErrorFromBefore (t * testing.T ) {
12971297 app := NewApp ()
12981298 app .Commands = []Command {
1299- Command {
1299+ {
13001300 Subcommands : []Command {
1301- Command {
1301+ {
13021302 Name : "sub" ,
13031303 },
13041304 },
@@ -1336,7 +1336,7 @@ func TestApp_OnUsageError_WithWrongFlagValue(t *testing.T) {
13361336 return errors .New ("intercepted: " + err .Error ())
13371337 }
13381338 app .Commands = []Command {
1339- Command {
1339+ {
13401340 Name : "bar" ,
13411341 },
13421342 }
@@ -1366,7 +1366,7 @@ func TestApp_OnUsageError_WithWrongFlagValue_ForSubcommand(t *testing.T) {
13661366 return errors .New ("intercepted: " + err .Error ())
13671367 }
13681368 app .Commands = []Command {
1369- Command {
1369+ {
13701370 Name : "bar" ,
13711371 },
13721372 }
0 commit comments