Skip to content

Commit

Permalink
Merge pull request #1005 from austinvazquez/update-golangci-lint-acti…
Browse files Browse the repository at this point in the history
…on-package

Update golangci-lint-action package to v4
  • Loading branch information
squeed committed Mar 11, 2024
2 parents 0729398 + 352e051 commit 019727a
Show file tree
Hide file tree
Showing 12 changed files with 20 additions and 30 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- uses: ibiqlik/action-yamllint@v3
with:
format: auto
- uses: golangci/golangci-lint-action@v3
- uses: golangci/golangci-lint-action@v4
with:
version: v1.55.2
args: -v
Expand Down
1 change: 0 additions & 1 deletion plugins/main/bridge/bridge.go
Original file line number Diff line number Diff line change
Expand Up @@ -790,7 +790,6 @@ func cmdDel(args *skel.CmdArgs) error {
}
return err
})

if err != nil {
// if NetNs is passed down by the Cloud Orchestration Engine, or if it called multiple times
// so don't return an error if the device is already removed.
Expand Down
2 changes: 0 additions & 2 deletions plugins/main/dummy/dummy.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,6 @@ func cmdAdd(args *skel.CmdArgs) error {
err = netns.Do(func(_ ns.NetNS) error {
return ipam.ConfigureIface(args.IfName, result)
})

if err != nil {
return err
}
Expand Down Expand Up @@ -165,7 +164,6 @@ func cmdDel(args *skel.CmdArgs) error {
}
return err
})

if err != nil {
// if NetNs is passed down by the Cloud Orchestration Engine, or if it called multiple times
// so don't return an error if the device is already removed.
Expand Down
2 changes: 1 addition & 1 deletion plugins/main/dummy/dummy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ var _ = Describe("dummy Operations", func() {
StdinData: []byte(fmt.Sprintf(confFmt, ver)),
}

_ = originalNS.Do(func(netNS ns.NetNS) error {
_ = originalNS.Do(func(_ ns.NetNS) error {
defer GinkgoRecover()

_, _, err = testutils.CmdAddWithArgs(args, func() error {
Expand Down
1 change: 0 additions & 1 deletion plugins/main/ipvlan/ipvlan.go
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,6 @@ func cmdDel(args *skel.CmdArgs) error {
}
return nil
})

if err != nil {
// if NetNs is passed down by the Cloud Orchestration Engine, or if it called multiple times
// so don't return an error if the device is already removed.
Expand Down
1 change: 0 additions & 1 deletion plugins/main/macvlan/macvlan.go
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,6 @@ func cmdDel(args *skel.CmdArgs) error {
}
return nil
})

if err != nil {
// if NetNs is passed down by the Cloud Orchestration Engine, or if it called multiple times
// so don't return an error if the device is already removed.
Expand Down
1 change: 0 additions & 1 deletion plugins/main/tap/tap.go
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,6 @@ func cmdDel(args *skel.CmdArgs) error {
}
return nil
})

if err != nil {
// if NetNs is passed down by the Cloud Orchestration Engine, or if it called multiple times
// so don't return an error if the device is already removed.
Expand Down
1 change: 0 additions & 1 deletion plugins/main/vlan/vlan.go
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,6 @@ func cmdDel(args *skel.CmdArgs) error {
}
return err
})

if err != nil {
// if NetNs is passed down by the Cloud Orchestration Engine, or if it called multiple times
// so don't return an error if the device is already removed.
Expand Down
4 changes: 2 additions & 2 deletions plugins/main/vlan/vlan_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,7 @@ var _ = Describe("vlan Operations", func() {
StdinData: []byte(fmt.Sprintf(confFmt, ver, masterInterface, 1600, isInContainer, dataDir)),
}

_ = originalNS.Do(func(netNS ns.NetNS) error {
_ = originalNS.Do(func(_ ns.NetNS) error {
defer GinkgoRecover()

_, _, err = testutils.CmdAddWithArgs(args, func() error {
Expand All @@ -520,7 +520,7 @@ var _ = Describe("vlan Operations", func() {
StdinData: []byte(fmt.Sprintf(confFmt, ver, masterInterface, -100, isInContainer, dataDir)),
}

_ = originalNS.Do(func(netNS ns.NetNS) error {
_ = originalNS.Do(func(_ ns.NetNS) error {
defer GinkgoRecover()

_, _, err = testutils.CmdAddWithArgs(args, func() error {
Expand Down
32 changes: 16 additions & 16 deletions plugins/meta/bandwidth/bandwidth_linux_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ var _ = Describe("bandwidth test", func() {
StdinData: []byte(conf),
}

Expect(hostNs.Do(func(netNS ns.NetNS) error {
Expect(hostNs.Do(func(_ ns.NetNS) error {
defer GinkgoRecover()
r, out, err := testutils.CmdAdd(containerNs.Path(), args.ContainerID, "", []byte(conf), func() error { return cmdAdd(args) })
Expect(err).NotTo(HaveOccurred(), string(out))
Expand Down Expand Up @@ -202,7 +202,7 @@ var _ = Describe("bandwidth test", func() {
return nil
})).To(Succeed())

Expect(hostNs.Do(func(n ns.NetNS) error {
Expect(hostNs.Do(func(_ ns.NetNS) error {
defer GinkgoRecover()

ifbLink, err := netlink.LinkByName(hostIfname)
Expand Down Expand Up @@ -260,7 +260,7 @@ var _ = Describe("bandwidth test", func() {
StdinData: []byte(conf),
}

Expect(hostNs.Do(func(netNS ns.NetNS) error {
Expect(hostNs.Do(func(_ ns.NetNS) error {
defer GinkgoRecover()

_, out, err := testutils.CmdAdd(containerNs.Path(), args.ContainerID, ifbDeviceName, []byte(conf), func() error { return cmdAdd(args) })
Expand All @@ -271,7 +271,7 @@ var _ = Describe("bandwidth test", func() {
return nil
})).To(Succeed())

Expect(hostNs.Do(func(n ns.NetNS) error {
Expect(hostNs.Do(func(_ ns.NetNS) error {
defer GinkgoRecover()

containerIfLink, err := netlink.LinkByName(hostIfname)
Expand Down Expand Up @@ -327,7 +327,7 @@ var _ = Describe("bandwidth test", func() {
StdinData: []byte(conf),
}

Expect(hostNs.Do(func(netNS ns.NetNS) error {
Expect(hostNs.Do(func(_ ns.NetNS) error {
defer GinkgoRecover()

_, out, err := testutils.CmdAdd(containerNs.Path(), args.ContainerID, ifbDeviceName, []byte(conf), func() error { return cmdAdd(args) })
Expand All @@ -338,7 +338,7 @@ var _ = Describe("bandwidth test", func() {
return nil
})).To(Succeed())

Expect(hostNs.Do(func(n ns.NetNS) error {
Expect(hostNs.Do(func(_ ns.NetNS) error {
defer GinkgoRecover()

containerIfLink, err := netlink.LinkByName(hostIfname)
Expand Down Expand Up @@ -396,7 +396,7 @@ var _ = Describe("bandwidth test", func() {
StdinData: []byte(conf),
}

Expect(hostNs.Do(func(netNS ns.NetNS) error {
Expect(hostNs.Do(func(_ ns.NetNS) error {
defer GinkgoRecover()

_, _, err := testutils.CmdAdd(containerNs.Path(), args.ContainerID, "", []byte(conf), func() error { return cmdAdd(args) })
Expand Down Expand Up @@ -448,7 +448,7 @@ var _ = Describe("bandwidth test", func() {
StdinData: []byte(conf),
}

Expect(hostNs.Do(func(netNS ns.NetNS) error {
Expect(hostNs.Do(func(_ ns.NetNS) error {
defer GinkgoRecover()
r, out, err := testutils.CmdAdd(containerNs.Path(), args.ContainerID, "", []byte(conf), func() error { return cmdAdd(args) })
Expect(err).NotTo(HaveOccurred(), string(out))
Expand Down Expand Up @@ -485,7 +485,7 @@ var _ = Describe("bandwidth test", func() {
return nil
})).To(Succeed())

Expect(hostNs.Do(func(n ns.NetNS) error {
Expect(hostNs.Do(func(_ ns.NetNS) error {
defer GinkgoRecover()

ifbLink, err := netlink.LinkByName(hostIfname)
Expand Down Expand Up @@ -551,7 +551,7 @@ var _ = Describe("bandwidth test", func() {
StdinData: []byte(conf),
}

Expect(hostNs.Do(func(netNS ns.NetNS) error {
Expect(hostNs.Do(func(_ ns.NetNS) error {
defer GinkgoRecover()

_, _, err := testutils.CmdAdd(containerNs.Path(), args.ContainerID, "", []byte(conf), func() error { return cmdAdd(args) })
Expand Down Expand Up @@ -601,7 +601,7 @@ var _ = Describe("bandwidth test", func() {
StdinData: []byte(conf),
}

Expect(hostNs.Do(func(netNS ns.NetNS) error {
Expect(hostNs.Do(func(_ ns.NetNS) error {
defer GinkgoRecover()
_, out, err := testutils.CmdAdd(containerNs.Path(), args.ContainerID, "", []byte(conf), func() error { return cmdAdd(args) })
Expect(err).NotTo(HaveOccurred(), string(out))
Expand Down Expand Up @@ -669,7 +669,7 @@ var _ = Describe("bandwidth test", func() {
StdinData: []byte(conf),
}

Expect(hostNs.Do(func(netNS ns.NetNS) error {
Expect(hostNs.Do(func(_ ns.NetNS) error {
defer GinkgoRecover()
r, out, err := testutils.CmdAdd(containerNs.Path(), args.ContainerID, "", []byte(conf), func() error { return cmdAdd(args) })
Expect(err).NotTo(HaveOccurred(), string(out))
Expand Down Expand Up @@ -706,7 +706,7 @@ var _ = Describe("bandwidth test", func() {
return nil
})).To(Succeed())

Expect(hostNs.Do(func(n ns.NetNS) error {
Expect(hostNs.Do(func(_ ns.NetNS) error {
defer GinkgoRecover()

ifbLink, err := netlink.LinkByName(hostIfname)
Expand Down Expand Up @@ -768,7 +768,7 @@ var _ = Describe("bandwidth test", func() {
StdinData: []byte(conf),
}

Expect(hostNs.Do(func(netNS ns.NetNS) error {
Expect(hostNs.Do(func(_ ns.NetNS) error {
defer GinkgoRecover()

_, _, err := testutils.CmdAdd(containerNs.Path(), args.ContainerID, "", []byte(conf), func() error { return cmdAdd(args) })
Expand Down Expand Up @@ -801,7 +801,7 @@ var _ = Describe("bandwidth test", func() {
StdinData: []byte(conf),
}

Expect(hostNs.Do(func(netNS ns.NetNS) error {
Expect(hostNs.Do(func(_ ns.NetNS) error {
defer GinkgoRecover()

_, _, err := testutils.CmdAdd(containerNs.Path(), args.ContainerID, "", []byte(conf), func() error { return cmdAdd(args) })
Expand Down Expand Up @@ -853,7 +853,7 @@ var _ = Describe("bandwidth test", func() {
StdinData: []byte(conf),
}

Expect(hostNs.Do(func(netNS ns.NetNS) error {
Expect(hostNs.Do(func(_ ns.NetNS) error {
defer GinkgoRecover()

_, _, err := testutils.CmdAdd(containerNs.Path(), args.ContainerID, "", []byte(conf), func() error { return cmdAdd(args) })
Expand Down
1 change: 0 additions & 1 deletion plugins/meta/sbr/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ func withLockAndNetNS(nspath string, toRun func(_ ns.NetNS) error) error {
}

err = ns.WithNetNSPath(nspath, toRun)

if err != nil {
return err
}
Expand Down
2 changes: 0 additions & 2 deletions plugins/meta/vrf/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ func cmdAdd(args *skel.CmdArgs) error {
}
return nil
})

if err != nil {
return fmt.Errorf("cmdAdd failed: %v", err)
}
Expand Down Expand Up @@ -121,7 +120,6 @@ func cmdDel(args *skel.CmdArgs) error {
}
return nil
})

if err != nil {
// if NetNs is passed down by the Cloud Orchestration Engine, or if it called multiple times
// so don't return an error if the device is already removed.
Expand Down

0 comments on commit 019727a

Please sign in to comment.