From 49eb94bbf7a0c157764e423f6b5e4a21143e9dd8 Mon Sep 17 00:00:00 2001 From: Sergey Matveev Date: Thu, 11 Mar 2021 12:05:28 +0300 Subject: [PATCH] Remove excess %s in log messages --- src/lockdir.go | 4 ++-- src/tmp.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lockdir.go b/src/lockdir.go index 2219d1b..902ec22 100644 --- a/src/lockdir.go +++ b/src/lockdir.go @@ -36,14 +36,14 @@ func (ctx *Ctx) LockDir(nodeId *NodeId, lockCtx string) (*os.File, error) { ) if err != nil { ctx.LogE("lockdir-open", LEs{{"Path", lockPath}}, err, func(les LEs) string { - return "Locking directory: opening %s" + lockPath + return "Locking directory: opening " + lockPath }) return nil, err } err = unix.Flock(int(dirLock.Fd()), unix.LOCK_EX|unix.LOCK_NB) if err != nil { ctx.LogE("lockdir-flock", LEs{{"Path", lockPath}}, err, func(les LEs) string { - return "Locking directory: locking %s" + lockPath + return "Locking directory: locking " + lockPath }) dirLock.Close() // #nosec G104 return nil, err diff --git a/src/tmp.go b/src/tmp.go index d3c833e..da96a25 100644 --- a/src/tmp.go +++ b/src/tmp.go @@ -46,7 +46,7 @@ func (ctx *Ctx) NewTmpFile() (*os.File, error) { fd, err := TempFile(jobsPath, "") if err == nil { ctx.LogD("tmp", LEs{{"Src", fd.Name()}}, func(les LEs) string { - return "Temporary file created: %s" + fd.Name() + return "Temporary file created: " + fd.Name() }) } return fd, err -- 2.48.1