Documentation ¶
Index ¶
- func Bytes(in string) []byte
- func GetPackageCode(ctx context.Context, archive *compiler.Archive, minify, initializer bool) (contents []byte, hash []byte, err error)
- func UnvendorPath(path string) string
- func WithCancel(ctx context.Context, f func()) bool
- type Builder
- func (b *Builder) BuildDir(ctx context.Context, packagePath string, importPath string, pkgObj string) (*CommandOutput, error)
- func (b *Builder) BuildFiles(ctx context.Context, filenames []string, pkgObj string, packagePath string) (*CommandOutput, error)
- func (b *Builder) BuildImportPath(ctx context.Context, path string) (*PackageData, *compiler.Archive, error)
- func (b *Builder) BuildPackage(ctx context.Context, pkg *PackageData) (*compiler.Archive, error)
- func (b *Builder) GetDependencies(ctx context.Context, archive *compiler.Archive) ([]*compiler.Archive, error)
- func (b *Builder) GetProgramCode(ctx context.Context, pkgs []*compiler.Archive) (string, []*PackageOutput, error)
- func (b *Builder) Import(ctx context.Context, path string, mode build.ImportMode, installSuffix string) (*PackageData, error)
- func (b *Builder) ImportDir(ctx context.Context, dir string, mode build.ImportMode, installSuffix string) (*PackageData, error)
- func (b *Builder) ImportStandardArchive(ctx context.Context, importPath string) (*compiler.Archive, error)
- func (b *Builder) InstallSuffix() string
- func (b *Builder) WriteCommandPackage(ctx context.Context, archive *compiler.Archive) (*CommandOutput, error)
- type CommandOutput
- type ImportCError
- type Options
- type PackageData
- type PackageOutput
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetPackageCode ¶
func UnvendorPath ¶
func WithCancel ¶
WithCancel executes the provided function, but returns early with true if the context cancellation signal was recieved.
Types ¶
type Builder ¶
type Builder struct { Archives map[string]*compiler.Archive Types map[string]*types.Package Callback func(*compiler.Archive) error // contains filtered or unexported fields }
func (*Builder) BuildFiles ¶
func (*Builder) BuildImportPath ¶
func (*Builder) BuildPackage ¶
func (*Builder) GetDependencies ¶
func (*Builder) GetProgramCode ¶
func (*Builder) Import ¶
func (b *Builder) Import(ctx context.Context, path string, mode build.ImportMode, installSuffix 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 (*Builder) ImportDir ¶
func (b *Builder) ImportDir(ctx context.Context, dir string, mode build.ImportMode, installSuffix string) (*PackageData, error)
ImportDir is like Import but processes the Go package found in the named directory.
func (*Builder) ImportStandardArchive ¶
func (*Builder) InstallSuffix ¶
func (*Builder) WriteCommandPackage ¶
type CommandOutput ¶
type CommandOutput struct { Path string Packages []*PackageOutput }
type ImportCError ¶
type ImportCError struct {
// contains filtered or unexported fields
}
func (*ImportCError) Error ¶
func (e *ImportCError) Error() string
type Options ¶
type Options struct { Temporary billy.Filesystem // Filesystem for temporary Archive storage (optional) Unvendor bool // Render JS with unvendored paths Initializer bool // Render JS with deferred initialization Send func(services.Message) Log io.Writer Verbose bool Quiet bool CreateMapFile bool MapToLocalDisk bool Minify bool Color bool Standard map[string]map[bool]string }
func (*Options) PrintError ¶
func (*Options) PrintSuccess ¶
type PackageData ¶
Click to show internal directories.
Click to hide internal directories.