Merge pull request #10473 from knusbaum/ioutil
{api,command/agent}: change io.Discard to ioutil.Discard
This commit is contained in:
commit
6dca50ac41
|
@ -1069,7 +1069,7 @@ func requireOK(d time.Duration, resp *http.Response, e error) (time.Duration, *h
|
|||
// is necessary to ensure that the http.Client's underlying RoundTripper is able
|
||||
// to re-use the TCP connection. See godoc on net/http.Client.Do.
|
||||
func closeResponseBody(resp *http.Response) error {
|
||||
_, _ = io.Copy(io.Discard, resp.Body)
|
||||
_, _ = io.Copy(ioutil.Discard, resp.Body)
|
||||
return resp.Body.Close()
|
||||
}
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ import (
|
|||
"context"
|
||||
"flag"
|
||||
"fmt"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"os/signal"
|
||||
"path/filepath"
|
||||
|
@ -182,7 +182,7 @@ func (c *cmd) run(args []string) int {
|
|||
if config.Logging.LogJSON {
|
||||
// Hide all non-error output when JSON logging is enabled.
|
||||
ui.Ui = &cli.BasicUI{
|
||||
BasicUi: mcli.BasicUi{ErrorWriter: c.ui.Stderr(), Writer: io.Discard},
|
||||
BasicUi: mcli.BasicUi{ErrorWriter: c.ui.Stderr(), Writer: ioutil.Discard},
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue