func FindAllOptions(t *Task, cfg *Config) ([]*Option, error) {
	names, err := getDependencies(t)
	if err != nil {
		return nil, err
	}

	candidates := make(map[string]*Option)
	for _, opt := range cfg.Options {
		// Args that share a name with global options take priority
		if _, ok := t.Args.Lookup(opt.Name); ok {
			continue
		}

		candidates[opt.Name] = opt
	}

	required := make([]*Option, 0, len(t.Options))
	for _, opt := range t.Options {
		candidates[opt.Name] = opt
		required = append(required, opt)
	}

	required, err = findRequiredOptionsRecursively(names, candidates, required)
	if err != nil {
		return nil, err
	}

	return required, nil
}
// FindAllOptions returns a list of options relevant for a given
FindAllOptions returns a list of options relevant for a given
// FindAllOptions returns a list of options relevant for a given
func FindAllOptions(t *Task, cfg *Config) ([]*Option, error) {
	names, err := getDependencies(t)
	if err != nil {
		return nil, err
	}
	candidates := make(map[string]*Option)
	for _, opt := range cfg.Options {
		if _, ok := t.Args.Lookup(opt.Name); ok {
			continue
		}
		candidates[opt.Name] = opt
	}
	required := make([]*Option, 0, len(t.Options))
	for _, opt := range t.Options {
		candidates[opt.Name] = opt
		required = append(required, opt)
	}
	required, err = findRequiredOptionsRecursively(names, candidates, required)
	if err != nil {
		return nil, err
	}
	return required, nil
}
func FindAllOptions ( t * Task , cfg * Config ) ( [ ] * Option , error ) { names , err := getDependencies ( t ) if err != nil { return nil , err } candidates := make ( map [ string ] * Option ) for _ , opt := range cfg . Options { if _ , ok := t . Args . Lookup ( opt . Name ) ; ok { continue } candidates [ opt . Name ] = opt } required := make ( [ ] * Option , 0 , len ( t . Options ) ) for _ , opt := range t . Options { candidates [ opt . Name ] = opt required = append ( required , opt ) } required , err = findRequiredOptionsRecursively ( names , candidates , required ) if err != nil { return nil , err } return required , nil }
FindAllOptions returns a list of options relevant for a given
FindAllOptions returns a list of options relevant for a given
// Args that share a name with global options take priority