Newer
Older
"code.fbi.h-da.de/cocsn/gosdn/cmd/gosdn-tview/app"
commands "code.fbi.h-da.de/cocsn/gosdn/cmd/gosdn-tview/grpc"
"github.com/gdamore/tcell"
"github.com/rivo/tview"
SetBorderColor(tcell.ColorSteelBlue).
SetTitle("Commands")
return v
}
func (c *CommandListView) GetContent() tview.Primitive {
func (v *CommandListView) GetCommands(app *app.App, rv *ResultAndInputView,
conn *grpc.ClientConn) {
for i, command := range commands.CommandList {
f := command.Function
v.commandsList.
AddItem(command.Name, command.Description, rune('a'+i), func() {
v.commandsList.AddItem("quit", "closes the application", 'q', func() {
app.Stop()
})