code: func checkExclusive(ctx *cli.Context, args ...interface{}) {
  	set := make([]string, 0, 1)
  	for i := 0; i < len(args); i++ {
  		// Make sure the next argument is a flag and skip if not set
  		flag, ok := args[i].(cli.Flag)
  		if !ok {
  			panic(fmt.Sprintf("invalid argument, not cli.Flag type: %T", args[i]))
  		}
  		// Check if next arg extends current and expand its name if so
  		name := flag.GetName()
  
  		if i+1 < len(args) {
  			switch option := args[i+1].(type) {
  			case string:
  				// Extended flag check, make sure value set doesn't conflict with passed in option
  				if ctx.GlobalString(flag.GetName()) == option {
  					name += "=" + option
  					set = append(set, "--"+name)
  				}
  				// shift arguments and continue
  				i++
  				continue
  
  			case cli.Flag:
  			default:
  				panic(fmt.Sprintf("invalid argument, not cli.Flag or string extension: %T", args[i+1]))
  			}
  		}
  		// Mark the flag if it's set
  		if ctx.GlobalIsSet(flag.GetName()) {
  			set = append(set, "--"+name)
  		}
  	}
  	if len(set) > 1 {
  		Fatalf("Flags %v can't be used at the same time", strings.Join(set, ", "))
  	}
  }
docs: // checkExclusive verifies that only a single instance of the provided flags was
  // set by the user. Each flag might optionally be followed by a string type to
  // specialize it further.