Remove uses of deprecated io/ioutil

The package has been deprecated since Go 1.16: https://go.dev/doc/go1.16#ioutil

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn
2022-03-10 01:46:06 +01:00
parent c8f7c1e93f
commit fc7ba75fd7
13 changed files with 35 additions and 42 deletions

View File

@ -3,7 +3,6 @@ package progress
import (
"context"
"io"
"io/ioutil"
"os"
"sync"
@ -88,7 +87,7 @@ func NewPrinter(ctx context.Context, w io.Writer, out console.File, mode string)
var c console.Console
switch mode {
case PrinterModeQuiet:
w = ioutil.Discard
w = io.Discard
case PrinterModeAuto, PrinterModeTty:
if cons, err := console.ConsoleFromFile(out); err == nil {
c = cons