runner

package
v0.2.5-rc.0 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsSupported added in v0.2.4

func IsSupported(block *document.CodeBlock) bool

func PrepareScript added in v0.2.4

func PrepareScript(cmds []string) string

Types

type Base

type Base struct {
	Dir    string
	Stdin  io.Reader
	Stdout io.Writer
	Stderr io.Writer
}

type Executable

type Executable interface {
	DryRun(context.Context, io.Writer)
	Run(context.Context) error
}

func New added in v0.2.1

func New(block *document.CodeBlock, base *Base) (Executable, error)

type Go

type Go struct {
	*Base
	Source string
}

func (*Go) DryRun

func (g *Go) DryRun(ctx context.Context, w io.Writer)

func (*Go) Run

func (g *Go) Run(ctx context.Context) error

type Shell

type Shell struct {
	*Base
	Cmds []string
}

func (*Shell) DryRun

func (s *Shell) DryRun(ctx context.Context, w io.Writer)

func (*Shell) Run

func (s *Shell) Run(ctx context.Context) error

type ShellRaw added in v0.3.0

type ShellRaw struct {
	*Base
	Cmds []string
}

func (*ShellRaw) DryRun added in v0.3.0

func (s *ShellRaw) DryRun(ctx context.Context, w io.Writer)

func (*ShellRaw) Run added in v0.3.0

func (s *ShellRaw) Run(ctx context.Context) error

Jump to

Keyboard shortcuts

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