@@ -33,15 +33,15 @@ func fakeIO(i *serpent.Invocation) *ioBufs {
3333func TestCommand (t * testing.T ) {
3434 t .Parallel ()
3535
36- cmd := func () * serpent.Cmd {
36+ cmd := func () * serpent.Command {
3737 var (
3838 verbose bool
3939 lower bool
4040 prefix string
4141 reqBool bool
4242 reqStr string
4343 )
44- return & serpent.Cmd {
44+ return & serpent.Command {
4545 Use : "root [subcommand]" ,
4646 Options : serpent.OptionSet {
4747 serpent.Option {
@@ -55,7 +55,7 @@ func TestCommand(t *testing.T) {
5555 Value : serpent .StringOf (& prefix ),
5656 },
5757 },
58- Children : []* serpent.Cmd {
58+ Children : []* serpent.Command {
5959 {
6060 Use : "required-flag --req-bool=true --req-string=foo" ,
6161 Short : "Example with required flags" ,
@@ -320,12 +320,12 @@ func TestCommand(t *testing.T) {
320320
321321func TestCommand_DeepNest (t * testing.T ) {
322322 t .Parallel ()
323- cmd := & serpent.Cmd {
323+ cmd := & serpent.Command {
324324 Use : "1" ,
325- Children : []* serpent.Cmd {
325+ Children : []* serpent.Command {
326326 {
327327 Use : "2" ,
328- Children : []* serpent.Cmd {
328+ Children : []* serpent.Command {
329329 {
330330 Use : "3" ,
331331 Handler : func (i * serpent.Invocation ) error {
@@ -348,7 +348,7 @@ func TestCommand_FlagOverride(t *testing.T) {
348348 t .Parallel ()
349349 var flag string
350350
351- cmd := & serpent.Cmd {
351+ cmd := & serpent.Command {
352352 Use : "1" ,
353353 Options : serpent.OptionSet {
354354 {
@@ -357,7 +357,7 @@ func TestCommand_FlagOverride(t *testing.T) {
357357 Value : serpent .DiscardValue ,
358358 },
359359 },
360- Children : []* serpent.Cmd {
360+ Children : []* serpent.Command {
361361 {
362362 Use : "2" ,
363363 Options : serpent.OptionSet {
@@ -392,7 +392,7 @@ func TestCommand_MiddlewareOrder(t *testing.T) {
392392 }
393393 }
394394
395- cmd := & serpent.Cmd {
395+ cmd := & serpent.Command {
396396 Use : "toupper [word]" ,
397397 Short : "Converts a word to upper case" ,
398398 Middleware : serpent .Chain (
@@ -416,8 +416,8 @@ func TestCommand_MiddlewareOrder(t *testing.T) {
416416func TestCommand_RawArgs (t * testing.T ) {
417417 t .Parallel ()
418418
419- cmd := func () * serpent.Cmd {
420- return & serpent.Cmd {
419+ cmd := func () * serpent.Command {
420+ return & serpent.Command {
421421 Use : "root" ,
422422 Options : serpent.OptionSet {
423423 {
@@ -426,7 +426,7 @@ func TestCommand_RawArgs(t *testing.T) {
426426 Value : serpent .StringOf (new (string )),
427427 },
428428 },
429- Children : []* serpent.Cmd {
429+ Children : []* serpent.Command {
430430 {
431431 Use : "sushi <args...>" ,
432432 Short : "Throws back raw output" ,
@@ -480,7 +480,7 @@ func TestCommand_RawArgs(t *testing.T) {
480480
481481func TestCommand_RootRaw (t * testing.T ) {
482482 t .Parallel ()
483- cmd := & serpent.Cmd {
483+ cmd := & serpent.Command {
484484 RawArgs : true ,
485485 Handler : func (i * serpent.Invocation ) error {
486486 _ , _ = i .Stdout .Write ([]byte (strings .Join (i .Args , " " )))
@@ -498,7 +498,7 @@ func TestCommand_RootRaw(t *testing.T) {
498498
499499func TestCommand_HyphenHyphen (t * testing.T ) {
500500 t .Parallel ()
501- cmd := & serpent.Cmd {
501+ cmd := & serpent.Command {
502502 Handler : (func (i * serpent.Invocation ) error {
503503 _ , _ = i .Stdout .Write ([]byte (strings .Join (i .Args , " " )))
504504 return nil
@@ -518,7 +518,7 @@ func TestCommand_ContextCancels(t *testing.T) {
518518
519519 var gotCtx context.Context
520520
521- cmd := & serpent.Cmd {
521+ cmd := & serpent.Command {
522522 Handler : (func (i * serpent.Invocation ) error {
523523 gotCtx = i .Context ()
524524 if err := gotCtx .Err (); err != nil {
@@ -537,8 +537,8 @@ func TestCommand_ContextCancels(t *testing.T) {
537537func TestCommand_Help (t * testing.T ) {
538538 t .Parallel ()
539539
540- cmd := func () * serpent.Cmd {
541- return & serpent.Cmd {
540+ cmd := func () * serpent.Command {
541+ return & serpent.Command {
542542 Use : "root" ,
543543 HelpHandler : (func (i * serpent.Invocation ) error {
544544 _ , _ = i .Stdout .Write ([]byte ("abdracadabra" ))
@@ -585,9 +585,9 @@ func TestCommand_Help(t *testing.T) {
585585func TestCommand_SliceFlags (t * testing.T ) {
586586 t .Parallel ()
587587
588- cmd := func (want ... string ) * serpent.Cmd {
588+ cmd := func (want ... string ) * serpent.Command {
589589 var got []string
590- return & serpent.Cmd {
590+ return & serpent.Command {
591591 Use : "root" ,
592592 Options : serpent.OptionSet {
593593 {
@@ -614,9 +614,9 @@ func TestCommand_SliceFlags(t *testing.T) {
614614func TestCommand_EmptySlice (t * testing.T ) {
615615 t .Parallel ()
616616
617- cmd := func (want ... string ) * serpent.Cmd {
617+ cmd := func (want ... string ) * serpent.Command {
618618 var got []string
619- return & serpent.Cmd {
619+ return & serpent.Command {
620620 Use : "root" ,
621621 Options : serpent.OptionSet {
622622 {
@@ -667,7 +667,7 @@ func TestCommand_DefaultsOverride(t *testing.T) {
667667 got string
668668 config serpent.YAMLConfigPath
669669 )
670- cmd := & serpent.Cmd {
670+ cmd := & serpent.Command {
671671 Options : serpent.OptionSet {
672672 {
673673 Name : "url" ,
0 commit comments