mirror of
https://github.com/opentofu/opentofu.git
synced 2025-01-11 00:22:32 -06:00
internal/legacy: deprecate io/ioutil (#352)
Signed-off-by: jay-dee7 <me@jsdp.dev>
This commit is contained in:
parent
dd85371fa2
commit
e5a617e450
@ -10,7 +10,6 @@ import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"log"
|
||||
"os"
|
||||
"reflect"
|
||||
@ -1958,7 +1957,7 @@ func ReadState(src io.Reader) (*State, error) {
|
||||
|
||||
// If we are JSON we buffer the whole thing in memory so we can read it twice.
|
||||
// This is suboptimal, but will work for now.
|
||||
jsonBytes, err := ioutil.ReadAll(buf)
|
||||
jsonBytes, err := io.ReadAll(buf)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("Reading state file failed: %v", err)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user