func (fs FlagSet) Exclusive(flag ...cli.Flag) (cli.Flag, error) {
	p := newPicker(len(flag))
	// fs.IsSetArgs(flag) returns true if it exists in arguments.
	n := p.pick(flag, fs.IsSetArgs)
	switch {
	case n == 1:
		f := p.found[0]
		return f, nil
	case n > 1:
		return nil, fmt.Errorf("%w ("+joinNames(p.found)+")", ErrExclusiveFlagsInArgs)
	}

	p.reset()
	// f.IsSet() returns true in following cases.
	//   - specified by EnvVars
	//   - specified by FilePath
	n = p.pick(flag, func(f cli.Flag) bool { return f.IsSet() })
	switch {
	case n == 1:
		f := p.found[0]
		return f, nil
	case n > 1:
		return nil, fmt.Errorf("%w ("+joinNames(p.found)+")", ErrExclusiveFlagsInEnvs)
	}
	return nil, nil
}
// Exclusive returns the flag only if it is set exclusively or nil if none is set,
// returns err!=nil if and only if multiple flags are set at the same time.
//
// At first command line arguments are searched.
// Next the environment variables (include FilePath) are searched.
// At most one flag can be specified at the same time,
// otherwise err!=nil is returned.
Exclusive returns the flag only if it is set exclusively or nil if none is set,
returns err!=nil if and only if multiple flags are set at the same time.

At first command line arguments are searched.
Next the environment variables (include FilePath) are searched.
At most one flag can be specified at the same time,
otherwise err!=nil is returned.
// Exclusive returns the flag only if it is set exclusively or nil if none is set // returns err! = nil if and only if multiple flags are set at the same time . // // At first command line arguments are searched . // Next the environment variables ( include FilePath ) are searched . // At most one flag can be specified at the same time // otherwise err! = nil is returned .
func (fs FlagSet) Exclusive(flag ...cli.Flag) (cli.Flag, error) {
	p := newPicker(len(flag))
	n := p.pick(flag, fs.IsSetArgs)
	switch {
	case n == 1:
		f := p.found[0]
		return f, nil
	case n > 1:
		return nil, fmt.Errorf("%w ("+joinNames(p.found)+")", ErrExclusiveFlagsInArgs)
	}
	p.reset()
	n = p.pick(flag, func(f cli.Flag) bool { return f.IsSet() })
	switch {
	case n == 1:
		f := p.found[0]
		return f, nil
	case n > 1:
		return nil, fmt.Errorf("%w ("+joinNames(p.found)+")", ErrExclusiveFlagsInEnvs)
	}
	return nil, nil
}
func ( fs FlagSet ) Exclusive ( flag ... cli . Flag ) ( cli . Flag , error ) { p := newPicker ( len ( flag ) ) n := p . pick ( flag , fs . IsSetArgs ) switch { case n == 1 : f := p . found [ 0 ] return f , nil case n > 1 : return nil , fmt . Errorf ( " " + joinNames ( p . found ) + " " , ErrExclusiveFlagsInArgs ) } p . reset ( ) n = p . pick ( flag , func ( f cli . Flag ) bool { return f . IsSet ( ) } ) switch { case n == 1 : f := p . found [ 0 ] return f , nil case n > 1 : return nil , fmt . Errorf ( " " + joinNames ( p . found ) + " " , ErrExclusiveFlagsInEnvs ) } return nil , nil }
Exclusive returns the flag only if it is set exclusively or nil if none is set,
returns err!=nil if and only if multiple flags are set at the same time.
Exclusive returns the flag only if it is set exclusively or nil if none is set returns err! = nil if and only if multiple flags are set at the same time .
// fs.IsSetArgs(flag) returns true if it exists in arguments. // f.IsSet() returns true in following cases. //   - specified by EnvVars //   - specified by FilePath