summaryrefslogtreecommitdiff
path: root/cmd/podman/system/events.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/podman/system/events.go')
-rw-r--r--cmd/podman/system/events.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/cmd/podman/system/events.go b/cmd/podman/system/events.go
index e698e6652..881b9b8f4 100644
--- a/cmd/podman/system/events.go
+++ b/cmd/podman/system/events.go
@@ -77,7 +77,7 @@ func eventsCmd(cmd *cobra.Command, _ []string) error {
errChannel := make(chan error)
var (
- tmpl *report.Template
+ rpt *report.Formatter
doJSON bool
)
@@ -85,7 +85,7 @@ func eventsCmd(cmd *cobra.Command, _ []string) error {
doJSON = report.IsJSON(eventFormat)
if !doJSON {
var err error
- tmpl, err = report.NewTemplate("events").Parse(eventFormat)
+ rpt, err = report.New(os.Stdout, cmd.Name()).Parse(report.OriginUser, eventFormat)
if err != nil {
return err
}
@@ -108,10 +108,10 @@ func eventsCmd(cmd *cobra.Command, _ []string) error {
}
fmt.Println(jsonStr)
case cmd.Flags().Changed("format"):
- if err := tmpl.Execute(os.Stdout, event); err != nil {
+ if err := rpt.Execute(event); err != nil {
return err
}
- fmt.Println("")
+ os.Stdout.WriteString("\n")
default:
fmt.Println(event.ToHumanReadable(!noTrunc))
}