hybridimporter

package
v0.0.0-...-5fef39c Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2024 License: MIT, MIT Imports: 11 Imported by: 1

README

hybridimporter

Package hybridimporter is an implementation of go/types.ImporterFrom that uses depdency export information where it can, falling back to a source-file based importer otherwise.

go get -u myitcv.io/hybridimporter

myitcv.io/hybridimporter

This is essentially a work-in-progress and will become obsolete when go/packages lands. The importer discussed in that thread will be able to take advantage of the build cache and also be go module-aware.

Currently relies on Go tip as of baf399b02e, which is due to be part of Go 1.11.

Documentation

Overview

Package hybridimporter is an implementation of go/types.ImporterFrom that uses depdency export information where it can, falling back to a source-file based importer otherwise.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(ctxt *build.Context, fset *token.FileSet, dir, path string) (*srcimporter.Importer, error)

New returns a go/types.ImporterFrom that uses build cache package files if they are available (i.e. compile), dropping back to a src-based importer otherwise. path is effectively optional, because if not specified it defaults to ".", i.e. the package in dir.

Types

This section is empty.

Directories

Path Synopsis
Package srcimporter implements importing directly from source files rather than installed packages.
Package srcimporter implements importing directly from source files rather than installed packages.

Jump to

Keyboard shortcuts

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