execplus

package
v1.0.9 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertByte2String added in v1.0.9

func ConvertByte2String(byte []byte, charset string) string

func SetShellName

func SetShellName(name string)

Types

type CmdPlus

type CmdPlus struct {
	*exec.Cmd
	// contains filtered or unexported fields
}

源码来源于:github.com/codeskyblue/kexec 增加两个功能: 1、增加退出Terminate函数(通过kill进程来实现) 2、两次调用Wait函数不会出错,原来exec调用两次会报错。

func Command

func Command(name string, arg ...string) *CmdPlus

func CommandContext

func CommandContext(ctx context.Context, name string, arg ...string) *CmdPlus

func CommandString

func CommandString(command string) *CmdPlus

func CommandStringContext

func CommandStringContext(ctx context.Context, command string) *CmdPlus

func (*CmdPlus) SetEnv

func (Self *CmdPlus) SetEnv(key, value string) bool

func (*CmdPlus) ShowConsole

func (Self *CmdPlus) ShowConsole(flag bool)

func (*CmdPlus) Terminate

func (Self *CmdPlus) Terminate()

func (*CmdPlus) Wait

func (Self *CmdPlus) Wait() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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