Skip to content

Commit

Permalink
lintエラーの修正
Browse files Browse the repository at this point in the history
  • Loading branch information
harakeishi committed Feb 11, 2023
1 parent 2042b50 commit 0b2f228
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 3 additions & 1 deletion trv/db.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ func (d *DB) loadData(repo, path string) error {
return fmt.Errorf("loadData fail:%w", err)
}
raw, _ := ioutil.ReadFile(fmt.Sprintf("%s/.trv/%s-%s.json", home, repo, strings.Replace(path, "/", "-", -1)))
json.Unmarshal(raw, &d.Tables)
if err := json.Unmarshal(raw, &d.Tables); err != nil {
return fmt.Errorf("loadData fail:%w", err)
}
return nil
}

Expand Down
5 changes: 4 additions & 1 deletion trv/trv.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package trv

import (
"fmt"
"log"
"strings"

"github.com/gdamore/tcell/v2"
Expand Down Expand Up @@ -191,7 +192,9 @@ func (t *Trv) setForm() {
t.Config.addSource(source)
t.Config.saveConfig()
t.setSource()
t.addDropdownOption()
if err := t.addDropdownOption(); err != nil {
log.Printf("addDropdownOption fail:%s", err)
}
t.Pages.HidePage("modal")
}).
AddButton("Quit", func() {
Expand Down

0 comments on commit 0b2f228

Please sign in to comment.