shell

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2023 License: MulanPSL-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExecShell

func ExecShell(ctx context.Context, command string) (string, error)

ExecShell 执行shell命令,可设置执行超时时间

func ExecShellEx

func ExecShellEx(ctx context.Context, cmd Cmd, command string) (string, error)

ExecShellEx 执行shell命令,可设置执行超时时间

Types

type Cmd

type Cmd interface {
	New(command string)
	Exec() (string, error)
	Destroy() error
}

type Result

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

type WindowShell

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

func (WindowShell) Exec

func (c WindowShell) Exec() (string, error)

func (*WindowShell) ExecShell

func (c *WindowShell) ExecShell(command string)

func (WindowShell) Kill

func (c WindowShell) Kill() error

Jump to

Keyboard shortcuts

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