Documentation ¶
Overview ¶
Package gotool manages access to the Go tool for building packages, plugins, and export data for feeding the go/types package.
It maintains a process-wide temporary directory that is used as a GOPATH for building ephemeral packages as part of executing the Neugram interpreter. It is process-wide because plugins are necessarily so, and so maintaining any finer-grained GOPATHs just lead to confusion and bugs.
Index ¶
- Variables
- type Manager
- func (m *Manager) Cleanup()
- func (m *Manager) Create(name string, contents []byte) (*plugin.Plugin, error)
- func (m *Manager) Dir(pkgPath string) (adjPkgPath, dir string, err error)
- func (m *Manager) ImportGo(path string) (*gotypes.Package, error)
- func (m *Manager) Open(mainPkgPath string) (*plugin.Plugin, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var M = new(Manager)
Functions ¶
This section is empty.
Types ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager is a process-global manager of an ephemeral GOPATH used to generate plugins.
Completely independent *Program objects co-ordinate the plugins they generate to avoid multiple attempts at loading the same plugin.
Click to show internal directories.
Click to hide internal directories.