Documentation
¶
Index ¶
- Constants
- type CLI
- type Content
- func (c *Content) Clear() string
- func (c *Content) GetLinesAfterPosition(pos int) (startOfLine int, lines []string)
- func (c *Content) InsertSymbol(symbol rune) string
- func (c *Content) MovePositionLeft() string
- func (c *Content) MovePositionRight() string
- func (c *Content) MoveToEnd() string
- func (c *Content) PrevSymbol() rune
- func (c *Content) RemoveSymbol() string
- func (c *Content) ReplaceText(text string) string
- func (c *Content) String() string
- func (c *Content) ToRequest() string
- type Editor
- type History
- type Inputer
- type Keyboard
- type RunOptions
Constants ¶
View Source
const ( HistoryFilename = ".wsget_history" HistoryLimit = 100 MacOSDeleteKey = 127 HideCursor = "\x1b[?25l" ShowCursor = "\x1b[?25h" Bell = "\a" )
View Source
const ( LineUp = "\x1b[1A" LineClear = "\x1b[2K" NewLine = '\n' ReturnCarriege = "\r" Backspace = "\b" )
View Source
const (
HistoryFileRigths = 0o644
)
View Source
const (
KeyboardBufferSize = 10
)
View Source
const (
PastingTimingThresholdInMicrosec = 250
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CLI ¶
type CLI struct {
// contains filtered or unexported fields
}
func (*CLI) RequestMod ¶ added in v0.2.0
func (*CLI) Run ¶
func (c *CLI) Run(opts RunOptions) error
type Content ¶ added in v0.2.0
type Content struct {
// contains filtered or unexported fields
}
func NewContent ¶ added in v0.2.0
func NewContent() *Content
func (*Content) GetLinesAfterPosition ¶ added in v0.2.0
func (*Content) InsertSymbol ¶ added in v0.2.0
func (*Content) MovePositionLeft ¶ added in v0.2.0
func (*Content) MovePositionRight ¶ added in v0.2.0
func (*Content) PrevSymbol ¶ added in v0.2.0
func (*Content) RemoveSymbol ¶ added in v0.2.0
func (*Content) ReplaceText ¶ added in v0.2.0
type Editor ¶ added in v0.2.0
type Editor struct {
History *History
// contains filtered or unexported fields
}
type History ¶
type History struct {
// contains filtered or unexported fields
}
func NewHistory ¶
func (*History) AddRequest ¶
func (*History) NextRequst ¶ added in v0.2.0
func (*History) PrevRequst ¶ added in v0.2.0
func (*History) ResetPosition ¶ added in v0.2.0
func (h *History) ResetPosition()
func (*History) SaveToFile ¶ added in v0.1.2
type Keyboard ¶ added in v0.2.0
type Keyboard struct{}
func NewKeyboard ¶ added in v0.2.0
func NewKeyboard() *Keyboard
type RunOptions ¶ added in v0.2.0
Click to show internal directories.
Click to hide internal directories.