Skip to content
Snippets Groups Projects

V.0.1.0 Codename Threadbare

Closed Ghost User requested to merge v.0.1.0-codename-threadbare into master
3 files
+ 23
23
Compare changes
  • Side-by-side
  • Inline
Files
3
@@ -13,33 +13,33 @@ type CommandListView struct {
}
func NewCommandListView() *CommandListView {
v := &CommandListView{
cv := &CommandListView{
commandsList: tview.NewList(),
}
v.commandsList.
cv.commandsList.
SetBorder(true).
SetBorderColor(tcell.ColorSteelBlue).
SetTitle("Commands")
return v
return cv
}
func (c *CommandListView) GetContent() tview.Primitive {
return c.commandsList
func (cv *CommandListView) GetContent() tview.Primitive {
return cv.commandsList
}
func (v *CommandListView) GetCommands(app *app.App, rv *ResultAndInputView,
func (cv *CommandListView) GetCommands(app *app.App, rv *ResultAndInputView,
conn *grpc.ClientConn) {
for i, command := range commands.CommandList {
f := command.Function
v.commandsList.
cv.commandsList.
AddItem(command.Name, command.Description, rune('a'+i), func() {
r := f(conn)
rv.SetContent(r)
})
}
v.commandsList.AddItem("quit", "closes the application", 'q', func() {
cv.commandsList.AddItem("quit", "closes the application", 'q', func() {
app.Stop()
})
}
Loading