From fef3e2da6a2024fff5142b5df80aba36e895ed73 Mon Sep 17 00:00:00 2001 From: Sascha Grunert Date: Mon, 3 Aug 2020 09:13:04 +0200 Subject: Remove some unnecessary []byte to string conversions Some calls to `Sprintf("%s")` can be avoided by using direct string type assertions. Signed-off-by: Sascha Grunert --- libpod/events/journal_linux.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'libpod/events') diff --git a/libpod/events/journal_linux.go b/libpod/events/journal_linux.go index 7c2a3e0f2..dc55dbc77 100644 --- a/libpod/events/journal_linux.go +++ b/libpod/events/journal_linux.go @@ -4,7 +4,6 @@ package events import ( "context" - "fmt" "strconv" "time" @@ -50,7 +49,7 @@ func (e EventJournalD) Write(ee Event) error { case Volume: m["PODMAN_NAME"] = ee.Name } - return journal.Send(fmt.Sprintf("%s", ee.ToHumanReadable()), journal.PriInfo, m) + return journal.Send(string(ee.ToHumanReadable()), journal.PriInfo, m) } // Read reads events from the journal and sends qualified events to the event channel -- cgit v1.2.3-54-g00ecf