cli/command/system: remove deprecated io/ioutil

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2022-02-25 14:32:43 +01:00
parent 78cb61c61c
commit e0299ff862
No known key found for this signature in database
GPG Key ID: 76698F39D527CE8C
2 changed files with 2 additions and 4 deletions

View File

@ -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

View File

@ -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,
})