packages

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2019 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package packages defines types for interpreting qualified names.

Index

Constants

This section is empty.

Variables

View Source
var (
	// DefaultPackage has an empty package name.
	DefaultPackage = NewPackage("")
)

Functions

This section is empty.

Types

type Packager

type Packager interface {
	// Package returns the qualified package name of the packager.
	//
	// The package path may be a namespace, package, or type.
	Package() string

	// ResolveCandidateNames returns the list of possible qualified names
	// visible within the module in name resolution order.
	//
	// Name candidates are returned in order of most to least qualified in
	// order to ensure that shadowing names are encountered first.
	ResolveCandidateNames(name string) []string
}

Packager helps interpret qualified names.

func NewPackage

func NewPackage(pkg string) Packager

NewPackage creates a new Packager with the given qualified package name.

Jump to

Keyboard shortcuts

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