Skip to content

Commit

Permalink
netlink: apply gofumpt
Browse files Browse the repository at this point in the history
Signed-off-by: Matt Layher <[email protected]>
  • Loading branch information
mdlayher committed Dec 10, 2019
1 parent eb3b753 commit a164477
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 4 deletions.
3 changes: 0 additions & 3 deletions attribute.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@ func MarshalAttributes(attrs []Attribute) ([]byte, error) {
// It is recommend to use the AttributeDecoder type where possible instead of calling
// UnmarshalAttributes and using package nlenc functions directly.
func UnmarshalAttributes(b []byte) ([]Attribute, error) {

ad, err := NewAttributeDecoder(b)
if err != nil {
return nil, err
Expand Down Expand Up @@ -165,7 +164,6 @@ type AttributeDecoder struct {
// NewAttributeDecoder creates an AttributeDecoder that unpacks Attributes
// from b and prepares the decoder for iteration.
func NewAttributeDecoder(b []byte) (*AttributeDecoder, error) {

ad := &AttributeDecoder{
// By default, use native byte order.
ByteOrder: nlenc.NativeEndian(),
Expand Down Expand Up @@ -235,7 +233,6 @@ func (ad *AttributeDecoder) Len() int { return ad.length }
// count scans the input slice to count the number of netlink attributes
// that could be decoded by Next().
func (ad *AttributeDecoder) available() (int, error) {

var i, count int
for {

Expand Down
1 change: 0 additions & 1 deletion attribute_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -760,7 +760,6 @@ func TestAttributeDecoderOK(t *testing.T) {
Type: 0xffff,
}},
fn: func(ad *AttributeDecoder) {

if diff := cmp.Diff(ad.Type(), uint16(0x3fff)); diff != "" {
panicf("unexpected Type (-want +got):\n%s", diff)
}
Expand Down

0 comments on commit a164477

Please sign in to comment.