dictresolver

package
v0.0.0-...-62694dd Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 17, 2018 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package dictresolver resolves according to an in-memory map.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadDictFromCSV

func ReadDictFromCSV(reader io.Reader) (map[jadeplib.ClassName][]bazel.Label, error)

ReadDictFromCSV reads a className --> []bazel.Label map from a CSV file. The format is: className,label1,label2,...

If there are no labels, a mapping to nil is returned. Labels must be in absolute form. Invalid labels are silently ignored.

Types

type Resolver

type Resolver struct {
	// contains filtered or unexported fields
}

Resolver resolves class names according to an in-memory map.

func NewResolver

func NewResolver(name string, dict *future.Value, loader pkgloading.Loader) *Resolver

NewResolver returns a new Resolver.

func (*Resolver) Name

func (r *Resolver) Name() string

Name returns a description of the resolver.

func (*Resolver) Resolve

func (r *Resolver) Resolve(ctx context.Context, classNames []jadeplib.ClassName, consumingRules map[bazel.Label]map[bazel.Label]bool) (map[jadeplib.ClassName][]*bazel.Rule, error)

Resolve resolves class names according to an in-memory map.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL