func NewRuleIndex(mrslv func(r *rule.Rule, pkgRel string) Resolver) *RuleIndex {
	return &RuleIndex{
		labelMap: make(map[label.Label]*ruleRecord),
		mrslv:    mrslv,
	}
}
func NewRuleIndex(mrslv func(r *rule.Rule, pkgRel string) Resolver) *RuleIndex {
	return &RuleIndex{
		labelMap: make(map[label.Label]*ruleRecord),
		mrslv:    mrslv,
	}
}
// NewRuleIndex creates a new index.
//
// kindToResolver is a map from rule kinds (for example, "go_library") to
// Resolvers that support those kinds.