build

package
v0.0.0-...-f81f1dc Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2015 License: BSD-2-Clause Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewBuildContext

func NewBuildContext(installSuffix string, buildTags []string) *build.Context

func NewMappingCallback

func NewMappingCallback(m *sourcemap.Map, goroot, gopath string) func(generatedLine, generatedColumn int, originalPos token.Position)

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 (o *Options) PrintError(format string, a ...interface{})

func (*Options) PrintSuccess

func (o *Options) PrintSuccess(format string, a ...interface{})

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 NewSession(options *Options) *Session

func (*Session) BuildDir

func (s *Session) BuildDir(packagePath string, importPath string, pkgObj string) error

func (*Session) BuildFiles

func (s *Session) BuildFiles(filenames []string, pkgObj string, packagePath string) error

func (*Session) BuildImportPath

func (s *Session) BuildImportPath(path string) (*compiler.Archive, error)

func (*Session) BuildPackage

func (s *Session) BuildPackage(pkg *PackageData) error

func (*Session) InstallSuffix

func (s *Session) InstallSuffix() string

func (*Session) WaitForChange

func (s *Session) WaitForChange()

func (*Session) WriteCommandPackage

func (s *Session) WriteCommandPackage(pkg *PackageData, pkgObj string) error

Jump to

Keyboard shortcuts

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