utils

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 23, 2021 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SUCCESS = iota
	CLI_ERROR
	INTERNAL_ERROR
	USER_ERROR
)
View Source
const (
	Input lineType = iota
	Output
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CapturedLine

type CapturedLine struct {
	Value    string
	LineType lineType
}

type CapturedToken

type CapturedToken struct {
	Finished bool
	Token    string
	Error    error
}

type CustomLogger

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

func NewLogger

func NewLogger(level string) (CustomLogger, error)

func (*CustomLogger) Close

func (logger *CustomLogger) Close()

func (*CustomLogger) Debug

func (logger *CustomLogger) Debug(args ...interface{})

func (*CustomLogger) Debugf

func (logger *CustomLogger) Debugf(template string, args ...interface{})

func (*CustomLogger) Error

func (logger *CustomLogger) Error(args ...interface{})

func (*CustomLogger) Info

func (logger *CustomLogger) Info(args ...interface{})

type Executable

type Executable struct {
	Stdin  io.WriteCloser
	Stdout io.ReadCloser
	// contains filtered or unexported fields
}

func StartExecutable

func StartExecutable(appPath string, args []string, logger Logger) (Executable, error)

func (*Executable) WaitForExit

func (executable *Executable) WaitForExit() (int, error)

type Logger

type Logger interface {
	Close()
	Debug(args ...interface{})
	Debugf(template string, args ...interface{})
	Error(args ...interface{})
	Info(args ...interface{})
}

Jump to

Keyboard shortcuts

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