Documentation ¶
Index ¶
- func NewBuildContext(installSuffix string, buildTags []string) *build.Context
- func NewMappingCallback(m *sourcemap.Map, goroot, gopath string) func(generatedLine, generatedColumn int, originalPos token.Position)
- type ImportCError
- type Options
- type PackageData
- type Session
- func (s *Session) BuildDir(packagePath string, importPath string, pkgObj string) error
- func (s *Session) BuildFiles(filenames []string, pkgObj string, packagePath string) error
- func (s *Session) BuildImportPath(path string) (*compiler.Archive, error)
- func (s *Session) BuildPackage(pkg *PackageData) error
- func (s *Session) InstallSuffix() string
- func (s *Session) WaitForChange()
- func (s *Session) WriteCommandPackage(pkg *PackageData, pkgObj string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewBuildContext ¶
Types ¶
type ImportCError ¶
type ImportCError struct {
// contains filtered or unexported fields
}
func (*ImportCError) Error ¶
func (e *ImportCError) Error() string
type Options ¶
type Options struct { GOROOT string GOPATH string Verbose bool Quiet bool Watch bool CreateMapFile bool Minify bool Color bool BuildTags []string }
func (*Options) PrintError ¶
func (*Options) PrintSuccess ¶
type PackageData ¶
type PackageData struct { *build.Package JSFiles []string IsTest bool // IsTest is true if the package is being built for running tests. SrcModTime time.Time UpToDate bool Archive *compiler.Archive }
func Import ¶
func Import(path string, mode build.ImportMode, installSuffix string, buildTags []string) (*PackageData, error)
Import returns details about the Go package named by the import path. If the path is a local import path naming a package that can be imported using a standard import path, the returned package will set p.ImportPath to that path.
In the directory containing the package, .go and .inc.js files are considered part of the package except for:
- .go files in package documentation
- files starting with _ or . (likely editor temporary files)
- files with build constraints not satisfied by the context
If an error occurs, Import returns a non-nil error and a nil *PackageData.
func ImportDir ¶
func ImportDir(dir string, mode build.ImportMode) (*PackageData, error)
ImportDir is like Import but processes the Go package found in the named directory.
type Session ¶
type Session struct { Packages map[string]*PackageData ImportContext *compiler.ImportContext Watcher *fsnotify.Watcher // contains filtered or unexported fields }
func NewSession ¶
func (*Session) BuildFiles ¶
func (*Session) BuildImportPath ¶
func (*Session) BuildPackage ¶
func (s *Session) BuildPackage(pkg *PackageData) error
func (*Session) InstallSuffix ¶
func (*Session) WaitForChange ¶
func (s *Session) WaitForChange()
func (*Session) WriteCommandPackage ¶
func (s *Session) WriteCommandPackage(pkg *PackageData, pkgObj string) error
Click to show internal directories.
Click to hide internal directories.