formatting and typos

Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
Jakub Sokołowski 2019-07-07 07:25:21 -04:00
parent 5f425f9e30
commit 619a55b179
No known key found for this signature in database
GPG Key ID: 4EF064D0E6D63020
2 changed files with 13 additions and 13 deletions

20
main.go
View File

@ -68,16 +68,16 @@ func main() {
}
// bindings defined separately so handlers can reference mainView
mainView.Keybindings = []Binding{
Binding{gocui.KeyCtrlC, gocui.ModNone, quit},
Binding{gocui.KeyArrowUp, gocui.ModNone, mainView.CursorUp},
Binding{gocui.KeyArrowDown, gocui.ModNone, mainView.CursorDown},
Binding{'r', gocui.ModNone, mainView.Refresh},
Binding{gocui.KeyCtrlL, gocui.ModNone, mainView.Refresh},
Binding{'k', gocui.ModNone, mainView.CursorUp},
Binding{'j', gocui.ModNone, mainView.CursorDown},
Binding{gocui.KeyDelete, gocui.ModNone, mainView.HandleDelete},
Binding{'d', gocui.ModNone, mainView.HandleDelete},
Binding{'t', gocui.ModNone, mainView.HandleTrust},
{gocui.KeyCtrlC, gocui.ModNone, quit},
{gocui.KeyArrowUp, gocui.ModNone, mainView.CursorUp},
{gocui.KeyArrowDown, gocui.ModNone, mainView.CursorDown},
{'r', gocui.ModNone, mainView.Refresh},
{gocui.KeyCtrlL, gocui.ModNone, mainView.Refresh},
{'k', gocui.ModNone, mainView.CursorUp},
{'j', gocui.ModNone, mainView.CursorDown},
{gocui.KeyDelete, gocui.ModNone, mainView.HandleDelete},
{'d', gocui.ModNone, mainView.HandleDelete},
{'t', gocui.ModNone, mainView.HandleTrust},
}
infoView := &ViewController{
Name: "info",

View File

@ -92,20 +92,20 @@ func (v *ViewController) SetKeybindings(g *gocui.Gui) error {
}
func (vc *ViewController) Refresh(g *gocui.Gui, v *gocui.View) error {
// TODO propper error handling?
// TODO proper error handling?
vc.StateCtrl.Fetch()
return nil
}
func (vc *ViewController) CursorUp(g *gocui.Gui, v *gocui.View) error {
// TODO propper error handling?
// TODO proper error handling?
current := vc.StateCtrl.State.GetData().Current
vc.StateCtrl.State.SetCurrentPeer(current - 1)
return nil
}
func (vc *ViewController) CursorDown(g *gocui.Gui, v *gocui.View) error {
// TODO propper error handling?
// TODO proper error handling?
current := vc.StateCtrl.State.GetData().Current
vc.StateCtrl.State.SetCurrentPeer(current + 1)
return nil