gobuild

package
v0.28.0 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2026 License: BSD-3-Clause, MIT Imports: 2 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RestorerResolver added in v0.16.0

type RestorerResolver struct {
	// FindPackage is called during Load to create the build.Package for a given import path from a
	// given directory. If FindPackage is nil, (*build.Context).Import is used. A client may use
	// this hook to adapt to a proprietary build system that does not follow the "go build" layout
	// conventions, for example. It must be safe to call concurrently from multiple goroutines.
	//
	// It should be noted that Manager only uses the Name from the returned *build.Package, so all
	// other fields can be left empty (as in SimpleFinder).
	FindPackage func(ctxt *build.Context, importPath, fromDir string, mode build.ImportMode) (*build.Package, error)
	Context     *build.Context
	Dir         string

	// Hints (package path -> name) is first checked before asking the build package
	Hints map[string]string
}

func New added in v0.16.0

func New(dir string) *RestorerResolver

func WithContext added in v0.16.0

func WithContext(dir string, context *build.Context) *RestorerResolver

func WithHints added in v0.23.0

func WithHints(dir string, hints map[string]string) *RestorerResolver

func (*RestorerResolver) ResolvePackage added in v0.16.0

func (r *RestorerResolver) ResolvePackage(importPath string) (string, error)

Jump to

Keyboard shortcuts

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