compiler

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2019 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeterminePluginSrcRoot added in v0.2.0

func DeterminePluginSrcRoot(fSys filesys.FileSystem) (string, error)

DeterminePluginSrcRoot guesses where the user has her ${g}/${v}/$lower(${k})/${k}.go files.

func FileExists

func FileExists(name string) bool

func RecentFileExists

func RecentFileExists(path string) bool

True if file less than 3 minutes old, i.e. not accidentally left over from some earlier build.

Types

type Compiler

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

Compiler creates Go plugin object files.

Source code is read from

${srcRoot}/${g}/${v}/${k}.go

Object code is written to

${objRoot}/${g}/${v}/${k}.so

func NewCompiler

func NewCompiler(srcRoot, objRoot string) *Compiler

NewCompiler returns a new compiler instance.

func (*Compiler) Compile

func (b *Compiler) Compile(g, v, k string) error

Compile reads ${srcRoot}/${g}/${v}/${k}.go

and writes ${objRoot}/${g}/${v}/${k}.so

func (*Compiler) ObjRoot

func (b *Compiler) ObjRoot() string

ObjRoot is root of compilation target tree.

func (*Compiler) SrcRoot

func (b *Compiler) SrcRoot() string

SrcRoot is where to find src.

Jump to

Keyboard shortcuts

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