debug

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: May 26, 2019 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const HTTP_PROXY_SERVER_SRC = `` /* 1116-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, to string, sudo bool) (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 Fmtx added in v0.2.1

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

func (*Fmtx) Write added in v0.2.1

func (f *Fmtx) Write(p []byte) (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
	TermLineColor   func(p []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 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