Documentation
¶
Overview ¶
TODO rename this to something clearer
Index ¶
- func DecodeScriptConfigInto(data *ScriptConfig, doc *document.Document, container *cst.Node, ...) error
- func DecodeWithOutputFormatInto(data *WithOutputFormat, doc *document.Document, container *cst.Node, ...) error
- func EncodeScriptConfigFrom(data *ScriptConfig, doc *document.Document, container *cst.Node) error
- func EncodeWithOutputFormatFrom(data *WithOutputFormat, doc *document.Document, container *cst.Node) error
- func MakeWriterTo(rs RemoteScript, env map[string]string, args ...string) (wt *writerTo, err error)
- func MakeWriterToWithStdin(script RemoteScript, env map[string]string, reader io.Reader, args ...string) (writerTo *writerTo, err error)
- type RemoteScript
- type RemoteScriptWithEnv
- type ScriptConfig
- type ScriptConfigDocument
- func (d *ScriptConfigDocument) Comment(key string) string
- func (d *ScriptConfigDocument) Data() *ScriptConfig
- func (d *ScriptConfigDocument) Encode() ([]byte, error)
- func (d *ScriptConfigDocument) InlineComment(key string) string
- func (d *ScriptConfigDocument) SetComment(key, comment string)
- func (d *ScriptConfigDocument) SetInlineComment(key, comment string)
- func (d *ScriptConfigDocument) Undecoded() []string
- type WithOutputFormat
- type WithOutputFormatDocument
- func (d *WithOutputFormatDocument) Comment(key string) string
- func (d *WithOutputFormatDocument) Data() *WithOutputFormat
- func (d *WithOutputFormatDocument) Encode() ([]byte, error)
- func (d *WithOutputFormatDocument) InlineComment(key string) string
- func (d *WithOutputFormatDocument) SetComment(key, comment string)
- func (d *WithOutputFormatDocument) SetInlineComment(key, comment string)
- func (d *WithOutputFormatDocument) Undecoded() []string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeScriptConfigInto ¶
func DecodeWithOutputFormatInto ¶
func EncodeScriptConfigFrom ¶
func EncodeWithOutputFormatFrom ¶
Types ¶
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) 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 ScriptConfigDocument ¶
type ScriptConfigDocument struct {
// contains filtered or unexported fields
}
func DecodeScriptConfig ¶
func DecodeScriptConfig(input []byte) (*ScriptConfigDocument, error)
func (*ScriptConfigDocument) Comment ¶
func (d *ScriptConfigDocument) Comment(key string) string
func (*ScriptConfigDocument) Data ¶
func (d *ScriptConfigDocument) Data() *ScriptConfig
func (*ScriptConfigDocument) Encode ¶
func (d *ScriptConfigDocument) Encode() ([]byte, error)
func (*ScriptConfigDocument) InlineComment ¶
func (d *ScriptConfigDocument) InlineComment(key string) string
func (*ScriptConfigDocument) SetComment ¶
func (d *ScriptConfigDocument) SetComment(key, comment string)
func (*ScriptConfigDocument) SetInlineComment ¶
func (d *ScriptConfigDocument) SetInlineComment(key, comment string)
func (*ScriptConfigDocument) Undecoded ¶
func (d *ScriptConfigDocument) Undecoded() []string
type WithOutputFormat ¶
type WithOutputFormat struct {
ScriptConfig
UTI string `toml:"uti"` // deprecated
UTIS []string `toml:"utis"`
FileExtension string `toml:"file-extension"`
}
func (WithOutputFormat) Equals ¶
func (a WithOutputFormat) Equals(b WithOutputFormat) bool
func (*WithOutputFormat) Merge ¶
func (s *WithOutputFormat) Merge(s2 WithOutputFormat)
type WithOutputFormatDocument ¶
type WithOutputFormatDocument struct {
// contains filtered or unexported fields
}
func DecodeWithOutputFormat ¶
func DecodeWithOutputFormat(input []byte) (*WithOutputFormatDocument, error)
func (*WithOutputFormatDocument) Comment ¶
func (d *WithOutputFormatDocument) Comment(key string) string
func (*WithOutputFormatDocument) Data ¶
func (d *WithOutputFormatDocument) Data() *WithOutputFormat
func (*WithOutputFormatDocument) Encode ¶
func (d *WithOutputFormatDocument) Encode() ([]byte, error)
func (*WithOutputFormatDocument) InlineComment ¶
func (d *WithOutputFormatDocument) InlineComment(key string) string
func (*WithOutputFormatDocument) SetComment ¶
func (d *WithOutputFormatDocument) SetComment(key, comment string)
func (*WithOutputFormatDocument) SetInlineComment ¶
func (d *WithOutputFormatDocument) SetInlineComment(key, comment string)
func (*WithOutputFormatDocument) Undecoded ¶
func (d *WithOutputFormatDocument) Undecoded() []string
Source Files
¶
- main.go
- main_tommy.go
- with_output_format.go
- with_output_format_tommy.go
- writer_to.go
Click to show internal directories.
Click to hide internal directories.