toolchain

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2022 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func E2Txt

func E2Txt() string

func ELang

func ELang() string

func Ecl

func Ecl() string

func EclErrorTips

func EclErrorTips(code EclError) string

Types

type E2TxtCmd

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

func NewE2TxtCmd

func NewE2TxtCmd(path string, args ...string) *E2TxtCmd

func (*E2TxtCmd) Exec

func (c *E2TxtCmd) Exec()

func (*E2TxtCmd) OnError

func (c *E2TxtCmd) OnError(onError ReportFunc)

func (*E2TxtCmd) OnExit

func (c *E2TxtCmd) OnExit(onExit ExitFunc)

func (*E2TxtCmd) OnLog

func (c *E2TxtCmd) OnLog(onLog ReportFunc)

func (*E2TxtCmd) OnOutDir

func (c *E2TxtCmd) OnOutDir(onOutDir ReportFunc)

type EclCmd

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

func NewEclCmd

func NewEclCmd(path string, args ...string) *EclCmd

func (*EclCmd) Exec

func (c *EclCmd) Exec()

func (*EclCmd) OnError

func (c *EclCmd) OnError(onError ReportFunc)

func (*EclCmd) OnExit

func (c *EclCmd) OnExit(onExit ExitFunc)

func (*EclCmd) OnLog

func (c *EclCmd) OnLog(onLog ReportFunc)

func (*EclCmd) Wait

func (c *EclCmd) Wait()

type EclError

type EclError int
const (
	EclErrorOk EclError = -iota
	EclErrorUnknown
	EclErrorParam
	EclErrorFileNotFound
	EclErrorFileInvalid
	EclErrorCompile
	EclErrorInvalidCompileType
	EclErrorECannotStart
	EclErrorCanNotGetMenu
	EclErrorShutdown
	EclErrorStatic
	EclErrorMakeLinkIni
	EclErrorBmInfo
	EclErrorBmCompile
	EclErrorPassword
	EclErrorEC
	EclErrorELib
	EclErrorStartTimeout
	EclErrorCompileTimeout
	EclErrorNotSupportEPkg
)
const EclErrorSuccess EclError = 1

func (EclError) IsOk

func (e EclError) IsOk() bool

type Exec

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

func NewExec

func NewExec(path string, args ...string) *Exec

func (*Exec) Exec

func (c *Exec) Exec()

func (*Exec) ForwardStdin

func (c *Exec) ForwardStdin()

func (*Exec) LoadEnv

func (c *Exec) LoadEnv(env map[string]string)

func (*Exec) OnExit

func (c *Exec) OnExit(onExit ExitFunc)

func (*Exec) OnStderr

func (c *Exec) OnStderr(onError ReportFunc)

func (*Exec) OnStdout

func (c *Exec) OnStdout(onLog ReportFunc)

func (*Exec) SetGbk

func (c *Exec) SetGbk(gbk bool)

func (*Exec) SetLogReader

func (c *Exec) SetLogReader(logReader LogReader)

func (*Exec) Wait

func (c *Exec) Wait()

type ExitFunc

type ExitFunc func(code int)

type LogReader

type LogReader func(reader *bufio.Reader) (bytes []byte, err error)
var (
	ReadLogByLine LogReader = func(reader *bufio.Reader) (bytes []byte, err error) {
		bytes, _, err = reader.ReadLine()
		return
	}
	ReadLogRealTime LogReader = func(reader *bufio.Reader) (bytes []byte, err error) {
		bytes = make([]byte, 1024)
		size := 0
		size, err = reader.Read(bytes)
		bytes = bytes[:size]
		return
	}
)

type ReportFunc

type ReportFunc func(string)

Jump to

Keyboard shortcuts

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