diff options
author | Francisco Miamoto <fsmiamoto@gmail.com> | 2020-08-30 11:31:19 -0300 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2020-08-31 09:22:39 +1000 |
commit | 250fe740b221e5d8b056e07a2e7acccdd70f886d (patch) | |
tree | 340607b804b4e7a9ec52cdd5ca8d9dde44c7d7bc | |
parent | 70eda031dcb4aa24422da54c6356fc60e22a037a (diff) |
use GetBool instead of casting
-rw-r--r-- | pkg/gui/files_panel.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg/gui/files_panel.go b/pkg/gui/files_panel.go index 0a8e1fc28..2f44e566f 100644 --- a/pkg/gui/files_panel.go +++ b/pkg/gui/files_panel.go @@ -517,7 +517,7 @@ func (gui *Gui) pushWithForceFlag(v *gocui.View, force bool, upstream string, ar branchName := gui.getCheckedOutBranch().Name err := gui.GitCommand.Push(branchName, force, upstream, args, gui.promptUserForCredential) if err != nil && !force && strings.Contains(err.Error(), "Updates were rejected") { - forcePushDisabled := gui.Config.GetUserConfig().Get("git.disableForcePushing").(bool) + forcePushDisabled := gui.Config.GetUserConfig().GetBool("git.disableForcePushing") if forcePushDisabled { gui.createErrorPanel(gui.Tr.SLocalize("UpdatesRejectedAndForcePushDisabled")) return @@ -568,7 +568,7 @@ func (gui *Gui) pushFiles(g *gocui.Gui, v *gocui.View) error { return gui.pushWithForceFlag(v, false, "", "") } - forcePushDisabled := gui.Config.GetUserConfig().Get("git.disableForcePushing").(bool) + forcePushDisabled := gui.Config.GetUserConfig().GetBool("git.disableForcePushing") if forcePushDisabled { return gui.createErrorPanel(gui.Tr.SLocalize("ForcePushDisabled")) } |