scripts

package
v0.4.0-beta.16 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type InterpreterNotFound

type InterpreterNotFound struct{}

func (*InterpreterNotFound) Error

func (e *InterpreterNotFound) Error() string

type Script

type Script struct {
	AbsolutePath     string
	Prefix           []byte
	Contents         []byte
	OriginalContents []byte
	Suffix           []byte
	BinaryPath       string
	CommandLine      string
	EnvReferenceName string
	Name             string
	ShellScript      bool
	// contains filtered or unexported fields
}

func NewScript

func NewScript(binary string, language string, contents []byte) (*Script, error)

func (*Script) AppendCommand

func (s *Script) AppendCommand(command string)

func (*Script) MakeExecutable

func (s *Script) MakeExecutable()

func (*Script) Write

func (s *Script) Write() error

type ScriptManager

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

func NewScriptManager

func NewScriptManager() *ScriptManager

func (*ScriptManager) AddScript

func (m *ScriptManager) AddScript(name, invocation string, contents []byte) (*Script, error)

func (*ScriptManager) AllScripts

func (m *ScriptManager) AllScripts() []*Script

func (*ScriptManager) GenerateReferences

func (m *ScriptManager) GenerateReferences() map[string]string

func (*ScriptManager) GetBase

func (m *ScriptManager) GetBase() *Script

func (*ScriptManager) GetPrevious

func (m *ScriptManager) GetPrevious() *Script

func (*ScriptManager) RemoveAll

func (m *ScriptManager) RemoveAll()

func (*ScriptManager) SetBaseScript

func (m *ScriptManager) SetBaseScript(invocation string, contents []byte) (*Script, error)

func (*ScriptManager) Write

func (m *ScriptManager) Write() (*Script, error)

Jump to

Keyboard shortcuts

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