From e0299ff86296393f89594863b13ed9bb5797b36b Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Fri, 25 Feb 2022 14:32:43 +0100 Subject: [PATCH] cli/command/system: remove deprecated io/ioutil Signed-off-by: Sebastiaan van Stijn --- cli/command/system/events.go | 3 +-- cli/command/system/info.go | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/cli/command/system/events.go b/cli/command/system/events.go index 37de9722ea..643cde070b 100644 --- a/cli/command/system/events.go +++ b/cli/command/system/events.go @@ -4,7 +4,6 @@ import ( "context" "fmt" "io" - "io/ioutil" "sort" "strings" "text/template" @@ -100,7 +99,7 @@ func makeTemplate(format string) (*template.Template, error) { } // we execute the template for an empty message, so as to validate // a bad template like "{{.badFieldString}}" - return tmpl, tmpl.Execute(ioutil.Discard, &eventtypes.Message{}) + return tmpl, tmpl.Execute(io.Discard, &eventtypes.Message{}) } // rfc3339NanoFixed is similar to time.RFC3339Nano, except it pads nanoseconds diff --git a/cli/command/system/info.go b/cli/command/system/info.go index 890b8cfd4c..f4882aa158 100644 --- a/cli/command/system/info.go +++ b/cli/command/system/info.go @@ -4,7 +4,6 @@ import ( "context" "fmt" "io" - "io/ioutil" "regexp" "sort" "strings" @@ -121,7 +120,7 @@ func needsServerInfo(template string, info info) bool { } // This constructs an "info" object that only has the client-side fields. - err = tmpl.Execute(ioutil.Discard, sparseInfo{ + err = tmpl.Execute(io.Discard, sparseInfo{ ClientInfo: info.ClientInfo, ClientErrors: info.ClientErrors, })