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
+ 12
7
Compare changes
  • Side-by-side
  • Inline
Files
3
@@ -9,17 +9,19 @@ import (
//CommandListView is an application view to display all the goSDN commands
type CommandListView struct {
title string
commandsList *tview.List
}
//NewCommandListView creates a new CommandListView
func NewCommandListView() *CommandListView {
func NewCommandListView(title string) *CommandListView {
cv := &CommandListView{
title: title,
commandsList: tview.NewList(),
}
cv.commandsList.
SetBorder(true).
SetTitle("Commands")
SetTitle(cv.title)
return cv
}
@@ -29,6 +31,11 @@ func (cv *CommandListView) GetContent() tview.Primitive {
return cv.commandsList
}
//GetTitle returns the title of the specific view
func (cv *CommandListView) GetTitle() string {
return cv.title
}
//GetCommands gets all goSDN commands from a command list and creates new
//tview.List items for each one of them. The specific gRPC functions are added
//as tview.Selected() function
Loading