Skip to content

Commit e0299ff

Browse files
committed
cli/command/system: remove deprecated io/ioutil
Signed-off-by: Sebastiaan van Stijn <[email protected]>
1 parent 78cb61c commit e0299ff

2 files changed

Lines changed: 2 additions & 4 deletions

File tree

cli/command/system/events.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import (
44
"context"
55
"fmt"
66
"io"
7-
"io/ioutil"
87
"sort"
98
"strings"
109
"text/template"
@@ -100,7 +99,7 @@ func makeTemplate(format string) (*template.Template, error) {
10099
}
101100
// we execute the template for an empty message, so as to validate
102101
// a bad template like "{{.badFieldString}}"
103-
return tmpl, tmpl.Execute(ioutil.Discard, &eventtypes.Message{})
102+
return tmpl, tmpl.Execute(io.Discard, &eventtypes.Message{})
104103
}
105104

106105
// rfc3339NanoFixed is similar to time.RFC3339Nano, except it pads nanoseconds

cli/command/system/info.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import (
44
"context"
55
"fmt"
66
"io"
7-
"io/ioutil"
87
"regexp"
98
"sort"
109
"strings"
@@ -121,7 +120,7 @@ func needsServerInfo(template string, info info) bool {
121120
}
122121

123122
// This constructs an "info" object that only has the client-side fields.
124-
err = tmpl.Execute(ioutil.Discard, sparseInfo{
123+
err = tmpl.Execute(io.Discard, sparseInfo{
125124
ClientInfo: info.ClientInfo,
126125
ClientErrors: info.ClientErrors,
127126
})

0 commit comments

Comments
 (0)