MCPcopy
hub / github.com/urfave/cli / newCommand

Function newCommand

flag_mutex_test.go:10–38  ·  flag_mutex_test.go::newCommand
()

Source from the content-addressed store, hash-verified

8)
9
10func newCommand() *Command {
11 return &Command{
12 MutuallyExclusiveFlags: []MutuallyExclusiveFlags{
13 {
14 Flags: [][]Flag{
15 {
16 &Int64Flag{
17 Name: "i",
18 },
19 &StringFlag{
20 Name: "s",
21 Sources: EnvVars("S_VAR"),
22 },
23 &BoolWithInverseFlag{
24 Name: "b",
25 },
26 },
27 {
28 &Int64Flag{
29 Name: "t",
30 Aliases: []string{"ai"},
31 Sources: EnvVars("T_VAR"),
32 },
33 },
34 },
35 },
36 },
37 }
38}
39
40func TestFlagMutuallyExclusiveFlags(t *testing.T) {
41 tests := []struct {

Callers 1

Calls 1

EnvVarsFunction · 0.85

Tested by

no test coverage detected