ci(lint): setup golangci-lint

Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
This commit is contained in:
Matthieu MOREL
2023-02-28 22:27:25 +00:00
parent 86e39cfe3c
commit d12b81dec5
110 changed files with 419 additions and 479 deletions

View File

@ -26,7 +26,6 @@ import (
"github.com/containernetworking/cni/pkg/types"
current "github.com/containernetworking/cni/pkg/types/100"
"github.com/containernetworking/cni/pkg/version"
"github.com/containernetworking/plugins/pkg/ip"
"github.com/containernetworking/plugins/pkg/ipam"
"github.com/containernetworking/plugins/pkg/ns"
@ -42,7 +41,6 @@ func parseNetConf(bytes []byte) (*types.NetConf, error) {
}
func createDummy(conf *types.NetConf, ifName string, netns ns.NetNS) (*current.Interface, error) {
dummy := &current.Interface{}
dm := &netlink.Dummy{
@ -245,7 +243,6 @@ func cmdCheck(args *skel.CmdArgs) error {
//
// Check prevResults for ips, routes and dns against values found in the container
if err := netns.Do(func(_ ns.NetNS) error {
// Check interface against values found in the container
err := validateCniContainerInterface(contMap)
if err != nil {
@ -262,11 +259,9 @@ func cmdCheck(args *skel.CmdArgs) error {
}
return nil
}
func validateCniContainerInterface(intf current.Interface) error {
var link netlink.Link
var err error