project

package
v0.0.0-...-43216c9 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2013 License: BSD-2-Clause Imports: 19 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Project

type Project struct {

	// SrcDirs represents the location of package sources.
	SrcDirs []SrcDir

	sync.Mutex // protects pkgs
	// contains filtered or unexported fields
}

Project represents a gogo project. A gogo project has a simlar layout to a $GOPATH workspace. Each gogo project has a standard directory layout starting at the project root, which we'll refer too as $PROJECT.

$PROJECT/			- the project root
$PROJECT/.gogo/			- used internally by gogo and identifies
				  the root of the project.
$PROJECT/src/			- base directory for the source of packages
$PROJECT/bin/			- base directory for the compiled binaries

func NewProject

func NewProject(root string) (*Project, error)

NewProject returns a *Project if root represents a valid gogo project.

func (*Project) Bindir

func (p *Project) Bindir() string

Bindir returns the top level directory representing the binary directory of this project.

func (*Project) ResolvePackage

func (p *Project) ResolvePackage(goos, goarch, path string) *pkgFuture

ResolvePackage resolves the import path to a Package.

func (*Project) Root

func (p *Project) Root() string

Root returns the top level directory representing this project.

type Resolver

type Resolver interface {
	// Resolve returns a *Package representing the source for package path
	// filtered by GOOS and GOARCH.
	ResolvePackage(goos, goarch, path string) *pkgFuture
}

Resolver resolves package import paths to Packages

type Spec

type Spec struct {
	// contains filtered or unexported fields
}

Spec represents a build specification.

func DefaultSpec

func DefaultSpec() Spec

DefaultSpec returns a Spec that represents this machine.

type SrcDir

type SrcDir struct {
	// contains filtered or unexported fields
}

SrcDir represents a directory containing some Go source packages.

func (*SrcDir) Find

func (s *SrcDir) Find(path string) (string, error)

Find resolves an import path to a source directory

func (*SrcDir) FindAll

func (s *SrcDir) FindAll() ([]string, error)

FindAdd returns the import paths of all the packages inside this SrcPath.

func (*SrcDir) SrcDir

func (s *SrcDir) SrcDir() string

type Statistics

type Statistics struct {
	sync.Mutex
	// contains filtered or unexported fields
}

Statistics records the various Durations

func (*Statistics) Record

func (s *Statistics) Record(name string, d time.Duration)

func (*Statistics) String

func (s *Statistics) String() string

func (*Statistics) Total

func (s *Statistics) Total() time.Duration

Jump to

Keyboard shortcuts

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