mirror of
https://github.com/opentofu/opentofu.git
synced 2025-02-25 18:45:20 -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"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
"io/ioutil"
|
|
||||||
"log"
|
"log"
|
||||||
"os"
|
"os"
|
||||||
"reflect"
|
"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.
|
// 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.
|
// This is suboptimal, but will work for now.
|
||||||
jsonBytes, err := ioutil.ReadAll(buf)
|
jsonBytes, err := io.ReadAll(buf)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, fmt.Errorf("Reading state file failed: %v", err)
|
return nil, fmt.Errorf("Reading state file failed: %v", err)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user