From 24841f22f16a7c73ac98a3ca82bd27e9a5ad4a92 Mon Sep 17 00:00:00 2001 From: Stefan Haller <stefan@haller-berlin.de> Date: Fri, 23 Aug 2024 20:11:28 +0200 Subject: [PATCH] Use print instead of printf when there are no arguments --- pkg/commands/git_config/cached_git_config.go | 4 ++-- pkg/gui/controllers/branches_controller.go | 2 +- pkg/integration/clients/cli.go | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/commands/git_config/cached_git_config.go b/pkg/commands/git_config/cached_git_config.go index 539691e13..9c12b45ee 100644 --- a/pkg/commands/git_config/cached_git_config.go +++ b/pkg/commands/git_config/cached_git_config.go @@ -42,7 +42,7 @@ func (self *CachedGitConfig) Get(key string) string { defer self.mutex.Unlock() if value, ok := self.cache[key]; ok { - self.log.Debugf("using cache for key " + key) + self.log.Debug("using cache for key " + key) return value } @@ -56,7 +56,7 @@ func (self *CachedGitConfig) GetGeneral(args string) string { defer self.mutex.Unlock() if value, ok := self.cache[args]; ok { - self.log.Debugf("using cache for args " + args) + self.log.Debug("using cache for args " + args) return value } diff --git a/pkg/gui/controllers/branches_controller.go b/pkg/gui/controllers/branches_controller.go index f0d0899a5..d22e56f1c 100644 --- a/pkg/gui/controllers/branches_controller.go +++ b/pkg/gui/controllers/branches_controller.go @@ -810,7 +810,7 @@ func (self *BranchesController) createPullRequestMenu(selectedBranch *models.Bra menuItems = append(menuItems, menuItemsForBranch(selectedBranch)...) - return self.c.Menu(types.CreateMenuOptions{Title: fmt.Sprintf(self.c.Tr.CreatePullRequestOptions), Items: menuItems}) + return self.c.Menu(types.CreateMenuOptions{Title: fmt.Sprint(self.c.Tr.CreatePullRequestOptions), Items: menuItems}) } func (self *BranchesController) createPullRequest(from string, to string) error { diff --git a/pkg/integration/clients/cli.go b/pkg/integration/clients/cli.go index 10958c164..34a5f85bd 100644 --- a/pkg/integration/clients/cli.go +++ b/pkg/integration/clients/cli.go @@ -49,7 +49,7 @@ func RunCLI(testNames []string, slow bool, sandbox bool, waitForDebugger bool, r func runAndPrintFatalError(test *components.IntegrationTest, f func() error) { if err := f(); err != nil { - log.Fatalf(err.Error()) + log.Fatal(err.Error()) } }