lnd: fix gosimple warnings

This commit is contained in:
Andrey Samokhvalov
2017-02-23 21:59:50 +03:00
committed by Olaoluwa Osuntokun
parent f5fd4138a0
commit 8fb54782e2
30 changed files with 73 additions and 319 deletions

View File

@@ -108,16 +108,11 @@ func (c *UpdateFailHTLC) Decode(r io.Reader, pver uint32) error {
// ChannelPoint(8)
// HTLCKey(8)
// Reason(??)
err := readElements(r,
return readElements(r,
&c.ChannelPoint,
&c.ID,
&c.Reason,
)
if err != nil {
return err
}
return nil
}
// Encode serializes the target UpdateFailHTLC into the passed io.Writer observing
@@ -125,16 +120,11 @@ func (c *UpdateFailHTLC) Decode(r io.Reader, pver uint32) error {
//
// This is part of the lnwire.Message interface.
func (c *UpdateFailHTLC) Encode(w io.Writer, pver uint32) error {
err := writeElements(w,
return writeElements(w,
c.ChannelPoint,
c.ID,
c.Reason,
)
if err != nil {
return err
}
return nil
}
// Command returns the integer uniquely identifying this message type on the