Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type RestoreAssets ¶
type SelfCompile ¶
type SelfCompile struct { // Main package source URL to install on recompile (if not bundled). Install string // Automatically call SelfCompile.Cleanup() after Compile() is done. AutoCleanup bool // Parameters used to setup the temporary workdir. Prefix string // Prefix for TempDir, used to stage recompiling assets. Root string // Root of TempDir (empty will use OS default). // RestoreAssets is the function generated by bindata to restore the assets // recursively within a given directory. RestoreAssets RestoreAssets // contains filtered or unexported fields }
SelfCompile provides controls for registering new plugins and re-compiling the binary.
func (*SelfCompile) Cleanup ¶
func (c *SelfCompile) Cleanup() error
Cleanup will delete any temporary files created for the workdir, good idea to call this as a defer after calling setup().
func (*SelfCompile) Compile ¶
func (c *SelfCompile) Compile() (err error)
Compile the program's source with the registered plugins.
func (*SelfCompile) Plugin ¶
func (c *SelfCompile) Plugin(p string)
Plugin registers a plugin to self-compile. Make sure to register the full set of plugins that need to be enabled during the compile, not just new plugins.
Directories ¶
Path | Synopsis |
---|---|
example
|
|
go-selfcompile binary is a helper wrapper around go-bindata for embedding the necessary assets to use SelfCompile.
|
go-selfcompile binary is a helper wrapper around go-bindata for embedding the necessary assets to use SelfCompile. |
Click to show internal directories.
Click to hide internal directories.