lnwire: fix deprecated usage

This commit is contained in:
zhiqiangxu 2024-03-21 10:05:17 +08:00
parent b575460bca
commit cbf676e404

View File

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