Merge pull request #8572 from zhiqiangxu/fix_deprecated

lnwire: fix deprecated usage
This commit is contained in:
Oliver Gugger 2024-03-21 01:23:02 -06:00 committed by GitHub
commit 9e59fb4563
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -4,7 +4,6 @@ import (
"bytes"
"fmt"
"io"
"io/ioutil"
"github.com/lightningnetwork/lnd/tlv"
)
@ -31,7 +30,7 @@ func (e *ExtraOpaqueData) Encode(w *bytes.Buffer) error {
func (e *ExtraOpaqueData) Decode(r io.Reader) error {
// First, we'll attempt to read a set of bytes contained within the
// passed io.Reader (if any exist).
rawBytes, err := ioutil.ReadAll(r)
rawBytes, err := io.ReadAll(r)
if err != nil {
return err
}