1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2024-11-30 09:16:47 +02:00

appease golangci

This commit is contained in:
Jesse Duffield 2019-03-12 19:20:19 +11:00
parent 3b2353b5ae
commit c98eddc185
3 changed files with 6 additions and 4 deletions

View File

@ -836,7 +836,7 @@ func (c *GitCommand) DiscardOldFileChanges(commits []*Commit, commitIndex int, f
// one where we handle the possibility of a credential request, and the other
// where we continue the rebase
if c.usingGpg() {
errors.New(c.Tr.SLocalize("DisabledForGPG"))
return errors.New(c.Tr.SLocalize("DisabledForGPG"))
}
commitSha := commits[commitIndex].Sha
@ -872,7 +872,7 @@ func (c *GitCommand) DiscardOldFileChanges(commits []*Commit, commitIndex int, f
// amend the commit
cmd, err = c.AmendHead()
if cmd != nil {
errors.New("received unexpected pointer to cmd")
return errors.New("received unexpected pointer to cmd")
}
if err != nil {
return err

View File

@ -75,7 +75,7 @@ func (gui *Gui) refreshCommits(g *gocui.Gui) error {
gui.handleCommitSelect(g, v)
}
if g.CurrentView() == gui.getCommitFilesView() {
gui.refreshCommitFilesView()
return gui.refreshCommitFilesView()
}
return nil
})

View File

@ -265,7 +265,9 @@ func (gui *Gui) onFocusLost(v *gocui.View, newView *gocui.View) error {
}
} else if v.Name() == "commitFiles" {
gui.g.SetViewOnBottom(v.Name())
if _, err := gui.g.SetViewOnBottom(v.Name()); err != nil {
return err
}
}
gui.Log.Info(v.Name() + " focus lost")
return nil