fix: minor syntax changes

This commit is contained in:
Adrien Waksberg 2020-12-22 17:11:02 +01:00
parent 4f35213585
commit 039b430e7d

View file

@ -132,7 +132,7 @@ func (c *Cli) EntryBox(entry Entry) {
ui.Render(p) ui.Render(p)
} }
// GroupBox to select a group // GroupsBox to select a group
func (c *Cli) GroupsBox() string { func (c *Cli) GroupsBox() string {
l := widgets.NewList() l := widgets.NewList()
l.Title = "Groups" l.Title = "Groups"
@ -152,9 +152,8 @@ func (c *Cli) GroupsBox() string {
case "<Enter>": case "<Enter>":
if len(l.Rows) == 0 { if len(l.Rows) == 0 {
return "" return ""
} else {
return l.Rows[l.SelectedRow]
} }
return l.Rows[l.SelectedRow]
case "j", "<Down>": case "j", "<Down>":
if len(l.Rows) > 0 { if len(l.Rows) > 0 {
l.ScrollDown() l.ScrollDown()
@ -410,7 +409,7 @@ func (c *Cli) ListEntries(ch chan<- bool) {
} }
} }
// Import entries from json file // ImportWallet import entries from json file
func (c *Cli) ImportWallet() error { func (c *Cli) ImportWallet() error {
_, err := os.Stat(*IMPORT) _, err := os.Stat(*IMPORT)
if err != nil { if err != nil {
@ -435,7 +434,7 @@ func (c *Cli) ImportWallet() error {
return nil return nil
} }
// Export a wallet in json format // ExportWallet export a wallet in json format
func (c *Cli) ExportWallet() error { func (c *Cli) ExportWallet() error {
data, err := c.Wallet.Export() data, err := c.Wallet.Export()
if err != nil { if err != nil {