exec

package
v1.7.1 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2025 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CommandFunc

func CommandFunc(ctx context.Context, args ...object.Object) object.Object

func Exec

func Exec(ctx context.Context, args ...object.Object) object.Object

func LookPath

func LookPath(ctx context.Context, args ...object.Object) object.Object

func Module

func Module() *object.Module

Types

type Command

type Command struct {
	// contains filtered or unexported fields
}

func NewCommand

func NewCommand(cmd *exec.Cmd) *Command

func (*Command) Compare

func (c *Command) Compare(other object.Object) (int, error)

func (*Command) Cost

func (c *Command) Cost() int

func (*Command) Equals

func (c *Command) Equals(other object.Object) object.Object

func (*Command) GetAttr

func (c *Command) GetAttr(name string) (object.Object, bool)

func (*Command) Inspect

func (c *Command) Inspect() string

func (*Command) Interface

func (c *Command) Interface() interface{}

func (*Command) IsTruthy

func (c *Command) IsTruthy() bool

func (*Command) MarshalJSON

func (c *Command) MarshalJSON() ([]byte, error)

func (*Command) Run

func (c *Command) Run(ctx context.Context) error

func (*Command) RunOperation

func (c *Command) RunOperation(opType op.BinaryOpType, right object.Object) object.Object

func (*Command) SetAttr

func (c *Command) SetAttr(name string, value object.Object) error

func (*Command) Stderr

func (c *Command) Stderr() object.Object

func (*Command) Stdout

func (c *Command) Stdout() object.Object

func (*Command) String

func (c *Command) String() string

func (*Command) Type

func (c *Command) Type() object.Type

func (*Command) Value

func (c *Command) Value() *exec.Cmd

type Result

type Result struct {
	// contains filtered or unexported fields
}

func NewResult

func NewResult(cmd *exec.Cmd) *Result

func (*Result) Compare

func (r *Result) Compare(other object.Object) (int, error)

func (*Result) Cost

func (r *Result) Cost() int

func (*Result) Equals

func (r *Result) Equals(other object.Object) object.Object

func (*Result) GetAttr

func (r *Result) GetAttr(name string) (object.Object, bool)

func (*Result) Inspect

func (r *Result) Inspect() string

func (*Result) Interface

func (r *Result) Interface() interface{}

func (*Result) IsTruthy

func (r *Result) IsTruthy() bool

func (*Result) JSON

func (r *Result) JSON() object.Object

func (*Result) MarshalJSON

func (r *Result) MarshalJSON() ([]byte, error)

func (*Result) RunOperation

func (r *Result) RunOperation(opType op.BinaryOpType, right object.Object) object.Object

func (*Result) SetAttr

func (r *Result) SetAttr(name string, value object.Object) error

func (*Result) Stderr

func (r *Result) Stderr() object.Object

func (*Result) Stdout

func (r *Result) Stdout() object.Object

func (*Result) Type

func (r *Result) Type() object.Type

Jump to

Keyboard shortcuts

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