diff options
author | Sascha Grunert <sgrunert@suse.com> | 2020-08-03 09:13:04 +0200 |
---|---|---|
committer | Sascha Grunert <sgrunert@suse.com> | 2020-08-03 09:13:04 +0200 |
commit | fef3e2da6a2024fff5142b5df80aba36e895ed73 (patch) | |
tree | 5eb2d1ec59719abd82b9114e0c30ae518e444a76 /libpod/events | |
parent | bfd34542f463b7ea59b9560516b3b3d66674eefe (diff) | |
download | podman-fef3e2da6a2024fff5142b5df80aba36e895ed73.tar.gz podman-fef3e2da6a2024fff5142b5df80aba36e895ed73.tar.bz2 podman-fef3e2da6a2024fff5142b5df80aba36e895ed73.zip |
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 <sgrunert@suse.com>
Diffstat (limited to 'libpod/events')
-rw-r--r-- | libpod/events/journal_linux.go | 3 |
1 files changed, 1 insertions, 2 deletions
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 |