wip
This commit is contained in:
@ -164,7 +164,10 @@ func (d *Decoder) DecodeVars(val any) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
type ScriptFunc func(ctx context.Context, opts ...interp.RunnerOption) error
|
||||
type (
|
||||
ScriptFunc func(ctx context.Context, opts ...interp.RunnerOption) error
|
||||
ScriptFuncWithSubshell func(ctx context.Context, opts ...interp.RunnerOption) (*interp.Runner, error)
|
||||
)
|
||||
|
||||
// GetFunc returns a function corresponding to a bash function
|
||||
// with the given name
|
||||
@ -197,10 +200,7 @@ func (d *Decoder) GetFuncP(name string, prepare PrepareFunc) (ScriptFunc, bool)
|
||||
}, true
|
||||
}
|
||||
|
||||
// TODO: replace
|
||||
func (d *Decoder) GetFuncSub(name string) (
|
||||
func(ctx context.Context, opts ...interp.RunnerOption) (*interp.Runner, error), bool,
|
||||
) {
|
||||
func (d *Decoder) GetFuncWithSubshell(name string) (ScriptFuncWithSubshell, bool) {
|
||||
fn := d.getFunc(name)
|
||||
if fn == nil {
|
||||
return nil, false
|
||||
|
Reference in New Issue
Block a user