command

package
v0.0.0-...-72659d8 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UTF8    = Charset("UTF-8")
	GB18030 = Charset("GB18030")
)

Variables

This section is empty.

Functions

func ConvertByte2String

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

Types

type Charset

type Charset string

type Commander

type Commander interface {
	Exec(args ...string) (int, string, error)
	ExecAsync(stdout chan string, args ...string) int
	ExecIgnoreResult(args ...string) error
}

func NewCommand

func NewCommand() Commander

type LinuxCommand

type LinuxCommand struct {
}

func NewLinuxCommand

func NewLinuxCommand() *LinuxCommand

func (*LinuxCommand) Exec

func (lc *LinuxCommand) Exec(args ...string) (int, string, error)

func (*LinuxCommand) ExecAsync

func (lc *LinuxCommand) ExecAsync(stdout chan string, args ...string) int

func (*LinuxCommand) ExecIgnoreResult

func (lc *LinuxCommand) ExecIgnoreResult(args ...string) error

type WindowsCommand

type WindowsCommand struct {
}

func NewWindowsCommand

func NewWindowsCommand() *WindowsCommand

func (*WindowsCommand) Exec

func (lc *WindowsCommand) Exec(args ...string) (int, string, error)

func (*WindowsCommand) ExecAsync

func (lc *WindowsCommand) ExecAsync(stdout chan string, args ...string) int

func (*WindowsCommand) ExecIgnoreResult

func (lc *WindowsCommand) ExecIgnoreResult(args ...string) error

Jump to

Keyboard shortcuts

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