compiler

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: May 11, 2020 License: Apache-2.0 Imports: 12 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(path string) bool

func FileModifiedAfter added in v0.3.3

func FileModifiedAfter(path string, t time.Time) bool

FileModifiedAfter returns true if the file both exists and was modified after the given time..

func FileYoungerThan added in v0.3.3

func FileYoungerThan(path string, d time.Duration) bool

FileYoungerThan returns true if the file both exists and has an age is <= the Duration argument.

Types

type Compiler

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

Compiler creates Go plugin object files.

func NewCompiler

func NewCompiler(root string) *Compiler

NewCompiler returns a new compiler instance.

func (*Compiler) Cleanup added in v0.3.3

func (b *Compiler) Cleanup()

Cleanup provides a hook to delete the .so file. Ignore errors.

func (*Compiler) Compile

func (b *Compiler) Compile() error

Compile changes its working directory to ${pluginRoot}/${g}/${v}/$lower(${k} and places object code next to source code.

func (*Compiler) ObjPath added in v0.3.3

func (b *Compiler) ObjPath() string

Absolute path to the compiler output (the .so file).

func (*Compiler) SetGVK added in v0.3.3

func (b *Compiler) SetGVK(g, v, k string)

Set GVK converts g,v,k tuples to file path components.

Jump to

Keyboard shortcuts

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