()
| 38 | } |
| 39 | |
| 40 | func buildExtendedTestCommand() *Command { |
| 41 | cmd := buildMinimalTestCommand() |
| 42 | cmd.Name = "greet" |
| 43 | cmd.Flags = []Flag{ |
| 44 | &StringFlag{ |
| 45 | Name: "socket", |
| 46 | Aliases: []string{"s"}, |
| 47 | Usage: "some 'usage' text", |
| 48 | Value: "value", |
| 49 | TakesFile: true, |
| 50 | }, |
| 51 | &StringFlag{Name: "flag", Aliases: []string{"fl", "f"}}, |
| 52 | &BoolFlag{ |
| 53 | Name: "another-flag", |
| 54 | Aliases: []string{"b"}, |
| 55 | Usage: "another usage text", |
| 56 | Sources: EnvVars("EXAMPLE_VARIABLE_NAME"), |
| 57 | }, |
| 58 | &BoolFlag{ |
| 59 | Name: "hidden-flag", |
| 60 | Hidden: true, |
| 61 | }, |
| 62 | } |
| 63 | cmd.Commands = []*Command{{ |
| 64 | Aliases: []string{"c"}, |
| 65 | Flags: []Flag{ |
| 66 | &StringFlag{ |
| 67 | Name: "flag", |
| 68 | Aliases: []string{"fl", "f"}, |
| 69 | TakesFile: true, |
| 70 | }, |
| 71 | &BoolFlag{ |
| 72 | Name: "another-flag", |
| 73 | Aliases: []string{"b"}, |
| 74 | Usage: "another usage text", |
| 75 | }, |
| 76 | }, |
| 77 | Name: "config", |
| 78 | Usage: "another usage test", |
| 79 | Commands: []*Command{{ |
| 80 | Aliases: []string{"s", "ss"}, |
| 81 | Flags: []Flag{ |
| 82 | &StringFlag{Name: "sub-flag", Aliases: []string{"sub-fl", "s"}}, |
| 83 | &BoolFlag{ |
| 84 | Name: "sub-command-flag", |
| 85 | Aliases: []string{"s"}, |
| 86 | Usage: "some usage text", |
| 87 | }, |
| 88 | }, |
| 89 | Name: "sub-config", |
| 90 | Usage: "another usage test", |
| 91 | }}, |
| 92 | }, { |
| 93 | Aliases: []string{"i", "in"}, |
| 94 | Name: "info", |
| 95 | Usage: "retrieve generic information", |
| 96 | }, { |
| 97 | Name: "some-command", |
no test coverage detected