Versions in this module Expand all Collapse all v1 v1.18.1 Aug 15, 2022 Changes in this version + var DefaultGOROOT = func() string { ... }() + func IsPkgNotFound(err error) bool + func NewMappingCallback(m *sourcemap.Map, goroot, gopath string, localMap bool) func(generatedLine, generatedColumn int, originalPos token.Position) + type Env struct + BuildTags []string + GOARCH string + GOOS string + GOPATH string + GOROOT string + InstallSuffix string + func DefaultEnv() Env + type JSFile struct + Content []byte + ModTime time.Time + Path string + type Options struct + BuildTags []string + Color bool + CreateMapFile bool + MapToLocalDisk bool + Minify bool + NoCache bool + Quiet bool + TestedPackage string + Verbose bool + Watch bool + func (o *Options) PrintError(format string, a ...interface{}) + func (o *Options) PrintSuccess(format string, a ...interface{}) + type PackageData struct + IsTest bool + IsVirtual bool + JSFiles []JSFile + SrcModTime time.Time + UpToDate bool + func Import(path string, mode build.ImportMode, installSuffix string, buildTags []string) (*PackageData, error) + func ImportDir(dir string, mode build.ImportMode, installSuffix string, buildTags []string) (*PackageData, error) + func (p *PackageData) InstallPath() string + func (p *PackageData) InternalBuildContext() *build.Context + func (p *PackageData) TestPackage() *PackageData + func (p *PackageData) XTestPackage() *PackageData + func (p PackageData) FileModTime() time.Time + func (p PackageData) String() string + type Session struct + Types map[string]*types.Package + UpToDateArchives map[string]*compiler.Archive + Watcher *fsnotify.Watcher + func NewSession(options *Options) (*Session, error) + func (s *Session) BuildFiles(filenames []string, pkgObj string, cwd string) error + func (s *Session) BuildImportPath(path string) (*compiler.Archive, error) + func (s *Session) BuildPackage(pkg *PackageData) (*compiler.Archive, error) + func (s *Session) GoRelease() string + func (s *Session) ImportResolverFor(pkg *PackageData) func(string) (*compiler.Archive, error) + func (s *Session) InstallSuffix() string + func (s *Session) SourceMappingCallback(m *sourcemap.Map) func(generatedLine, generatedColumn int, originalPos token.Position) + func (s *Session) WaitForChange() + func (s *Session) WriteCommandPackage(archive *compiler.Archive, pkgObj string) error + func (s *Session) XContext() XContext + type XContext interface + Env func() Env + Import func(path string, srcDir string, mode build.ImportMode) (*PackageData, error) + Match func(patterns []string) ([]string, error) + func NewBuildContext(installSuffix string, buildTags []string) XContext