Skip to content
Myr

fix: remove deprecated io/ioutils package (#2120)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

ioutils.ReadAll is deprecated since Go 1.16. This commit replaces it with io.ReadAll. See https://pkg.go.dev/io/ioutil\#ReadAll for reference Issue #2119

authored by Pedro Mota · committed by GitHub · parent 1f80fa2 · Browse files · 1 file+3 added−3 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+3 added−3 removed

  • other:+3 added−3 removed

1 file+3 added−3 removed

modified:command_test.go+3 added-3 removed
16 unmodified lines
17import (18 "bytes"19 "context"20 "fmt"21 "io/ioutil"21 "io"22 "os"23 "reflect"24 "strings"25 "testing"
2065 unmodified lines
2091 if err := root.Execute(); err != nil {2092 t.Error(err)2093 }20942095 gotErrBytes, err := ioutil.ReadAll(errBuff)2095 gotErrBytes, err := io.ReadAll(errBuff)2096 if err != nil {2097 t.Error(err)2098 }20992100 gotOutBytes, err := ioutil.ReadAll(outBuff)2100 gotOutBytes, err := io.ReadAll(outBuff)2101 if err != nil {2102 t.Error(err)2103 }2104
715 unmodified lines