script_config

package
v0.0.0-...-381c4e2 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeWriterTo

func MakeWriterTo(
	rs RemoteScript,
	env map[string]string,
	args ...string,
) (wt *writerTo, err error)

func MakeWriterToWithStdin

func MakeWriterToWithStdin(
	rs RemoteScript,
	env map[string]string,
	r io.Reader,
	args ...string,
) (wt *writerTo, err error)

Types

type RemoteScript

type RemoteScript interface {
	Cmd(args ...string) (*exec.Cmd, error)
}

type RemoteScriptWithEnv

type RemoteScriptWithEnv interface {
	RemoteScript
	Environ() map[string]string
}

type ScriptConfig

type ScriptConfig struct {
	Description string            `toml:"description"`
	Shell       []string          `toml:"shell,omitempty"`
	Script      string            `toml:"script,omitempty,multiline"`
	Env         map[string]string `toml:"env,omitempty"`
}

func (ScriptConfig) Cmd

func (s ScriptConfig) Cmd(args ...string) (c *exec.Cmd, err error)

func (*ScriptConfig) Environ

func (a *ScriptConfig) Environ() map[string]string

func (ScriptConfig) Equals

func (a ScriptConfig) Equals(b ScriptConfig) bool

func (*ScriptConfig) Merge

func (s *ScriptConfig) Merge(s2 ScriptConfig)

func (*ScriptConfig) Reset

func (a *ScriptConfig) Reset()

type WithOutputFormat

type WithOutputFormat struct {
	ScriptConfig
	UTI           string   `toml:"uti"` // deprecated
	UTIS          []string `toml:"utis"`
	FileExtension string   `toml:"file-extension"`
}

func (WithOutputFormat) Equals

func (*WithOutputFormat) Merge

func (s *WithOutputFormat) Merge(s2 WithOutputFormat)

Jump to

Keyboard shortcuts

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