Documentation
¶
Index ¶
- Variables
- func AsRelaxedRegexp(regex string) (ret string)
- func CheckSelfRunning(opts appkit.Options) (err error)
- func Cli(opts appkit.Options, argsin []string) (args []string, err error)
- func DefaultConfigFile(opts appkit.Options) string
- func ErrAnnotate(err error, a ...interface{}) error
- func Ui(opts appkit.Options, args []string) (ret string, err error)
- type AsyncSource
- type Buffer
- type Command
- type Profiler
- type Source
- type SourceFile
- type SourceReader
- type UIView
- func (u *UIView) Clear()
- func (u *UIView) Flush()
- func (u *UIView) GetDataLineCount() (ret int)
- func (u *UIView) GetHighlightLine() (string, int)
- func (u *UIView) MoveHighlightAndView(ydiff int)
- func (u *UIView) Read(p []byte) (n int, err error)
- func (u *UIView) SetInputLine(line string, cursorx int)
- func (u *UIView) SetStatusLine(line string)
- func (u *UIView) ViewSize() (x int, y int)
- func (u *UIView) Write(p []byte) (n int, err error)
Constants ¶
This section is empty.
Variables ¶
var UiAbortedErr = fmt.Errorf("User interface was aborted")
UiAbortedErr tells if user wanted to abort
var UiSelectedErr = fmt.Errorf("User selected a line")
UiSelectedErr tells that user selected a line
Functions ¶
func AsRelaxedRegexp ¶
AsRelaxedRegexp converts spaces in a string to .*
func CheckSelfRunning ¶
func DefaultConfigFile ¶
DefaultConfigFile gets the default configuration file name based on given Options
func ErrAnnotate ¶ added in v0.6.0
Types ¶
type AsyncSource ¶
type Buffer ¶
type Buffer struct { // Callback that provides data out Passthrough io.Writer // contains filtered or unexported fields }
func (*Buffer) GetRealLine ¶
GetRealLine gets the original buffer line for the given line in the filtered output
type Profiler ¶
type Profiler struct {
// contains filtered or unexported fields
}
Profiler is a structure to simplify generating CPU and memory profile files from a run of a program.
func SetupProfiler ¶ added in v0.6.0
SetupProfiler sets up an empty profiler with Options. The options should contain keys "profile-cpu-file" which is the file name for the CPU profile. Also the memory profile will be written to value of key "profile-mem-file".
type SourceFile ¶
type SourceFile struct { FileName string SourceReader }
func (*SourceFile) Run ¶
func (f *SourceFile) Run(args ...string) (err error)
func (*SourceFile) Wait ¶
func (f *SourceFile) Wait()
type SourceReader ¶
func (*SourceReader) Finish ¶
func (r *SourceReader) Finish() (err error)
func (*SourceReader) IsOneShot ¶
func (r *SourceReader) IsOneShot() bool
func (*SourceReader) Run ¶
func (r *SourceReader) Run(...string) error
func (*SourceReader) Wait ¶
func (r *SourceReader) Wait()
type UIView ¶
type UIView struct {
// contains filtered or unexported fields
}
UIView is the graphical representation of the data. It is used to draw the data to the screen.
func (*UIView) GetDataLineCount ¶
GetDataLineCount returns the number of lines in the view
func (*UIView) GetHighlightLine ¶
GetHighlightLine returns the string and the line from the view buffer that is currently highlighted
func (*UIView) MoveHighlightAndView ¶
MoveHighlightAndView moves the highlight primarily. Can shift the view if at limits.
func (*UIView) SetInputLine ¶
SetInputLine sets the input line to given and moves the cursor to absolute x
func (*UIView) SetStatusLine ¶
SetStatusLine sets the status line to a given string