debug

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2019 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const HTTP_PROXY_SERVER_SRC = `` /* 1136-byte string literal not displayed */

Variables

View Source
var (
	Info = &Fmt{
		LinePrefix: "[debug] ",
		Color:      T_COLOR_GRAY,
	}
	Ok = &Fmt{
		LinePrefix: "[debug] ",
		Color:      T_COLOR_GREEN,
	}
	Warn = &Fmt{
		LinePrefix: "[debug] ",
		Color:      T_COLOR_RED,
	}
)

Functions

func AddCommand

func AddCommand(names string, handler func(args ...string) (ret string, err error))

func AddProcess

func AddProcess(process *Process) error

func Run

func Run()

func UseHttpProxy

func UseHttpProxy(port uint16, sudo bool, backServer string, backServerProtocol string) (err error)

Types

type Fmt

type Fmt struct {
	LinePrefix string
	Color      TermColor
	Pipe       io.Writer
	// contains filtered or unexported fields
}

func (*Fmt) ColorPrint

func (f *Fmt) ColorPrint(color TermColor, args ...interface{}) (n int, err error)

func (*Fmt) ColorPrintf

func (f *Fmt) ColorPrintf(color TermColor, format string, args ...interface{}) (n int, err error)

func (*Fmt) ColorPrintln

func (f *Fmt) ColorPrintln(color TermColor, args ...interface{}) (n int, err error)

func (*Fmt) Print

func (f *Fmt) Print(args ...interface{}) (n int, err error)

func (*Fmt) Printf

func (f *Fmt) Printf(format string, args ...interface{}) (n int, err error)

func (*Fmt) Println

func (f *Fmt) Println(args ...interface{}) (n int, err error)

type Process

type Process struct {
	Sudo             bool
	Name             string
	Path             string
	Args             []string
	Env              []string
	BuildArgs        []string
	GoCode           string
	GoFile           string
	GoPkg            string
	LinkedPkgs       []string
	LinkedFiles      []string
	LinkedPlatforms  []string
	BeforeBuild      func(*Process) error
	TermLinePrefix   string
	TermColorManager func(b []byte) TermColor

	*os.Process
	// contains filtered or unexported fields
}

func (*Process) Build

func (process *Process) Build() (err error)

func (*Process) ProcessName

func (process *Process) ProcessName() (processName string)

func (*Process) Start

func (process *Process) Start() (err error)

func (*Process) Stop

func (process *Process) Stop() (err error)

type Stdio

type Stdio struct {
	*Fmt
	// contains filtered or unexported fields
}

func (*Stdio) Write

func (f *Stdio) Write(p []byte) (n int, err error)

type TermColor

type TermColor uint
const (
	T_COLOR_NORMAL TermColor = 0
	T_COLOR_RED    TermColor = 31
	T_COLOR_GREEN  TermColor = 32
	T_COLOR_YELLOW TermColor = 33
	T_COLOR_BLUE   TermColor = 34
	T_COLOR_PURPLE TermColor = 35
	T_COLOR_CYAN   TermColor = 36
	T_COLOR_GRAY   TermColor = 37
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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