Documentation
¶
Index ¶
- Variables
- func Register[T Bridge](i T, lang []string, ext []string)
- func Run(path string, args ...string) (cmd *exec.Cmd, err error)
- func RunContext(ctx context.Context, path string, args ...string) (cmd *exec.Cmd, err error)
- func RunContextWith(ctx context.Context, bridge Bridge, path string, args ...string) (cmd *exec.Cmd, err error)
- func Unmarshal(path string, data any, out any) (err error)
- func UnmarshalContext(ctx context.Context, path string, data any, out any) (err error)
- func UnmarshalText(input []byte, out any) (err error)
- type Bridge
- type InlineUnmarshaler
- type Unmarshaler
Constants ¶
This section is empty.
Variables ¶
View Source
var Extensions = map[string][]Bridge{}
View Source
var Languages = map[string]Bridge{}
View Source
var Unmarshalers = map[string]Unmarshaler{}
Functions ¶
func RunContext ¶
func RunContextWith ¶
func RunContextWith(ctx context.Context, bridge Bridge, path string, args ...string) (cmd *exec.Cmd, err error)
Utility functions.
func UnmarshalContext ¶
External facing convenience functions.
func UnmarshalText ¶
Types ¶
type Bridge ¶
type Bridge interface { // Run the script at the given path with the given arguments. Run(ctx context.Context, script string, args ...string) (cmd *exec.Cmd, err error) // Run the script at the given path with the given parameters, unmarshal the result into out. // Can also be a data format, such as JSON where the parameters are ignored. Unmarshal(ctx context.Context, path string, params any, out any) (err error) }
type InlineUnmarshaler ¶
type Unmarshaler ¶
func (Unmarshaler) Register ¶
func (u Unmarshaler) Register(ext ...string)
Click to show internal directories.
Click to hide internal directories.