From b06703dbcfb37e0934fe024edde8a95c6b80de86 Mon Sep 17 00:00:00 2001 From: clyi Date: Mon, 23 Sep 2024 14:23:11 +0800 Subject: [PATCH] coding style fix Signed-off-by: clyi --- pkg/daemon/ovs_linux.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/daemon/ovs_linux.go b/pkg/daemon/ovs_linux.go index 4d16af8f542..a4eb423721d 100644 --- a/pkg/daemon/ovs_linux.go +++ b/pkg/daemon/ovs_linux.go @@ -1050,7 +1050,7 @@ func configureMirrorLink(portName string, _ int) error { // Convert MAC address to EUI-64 and generate link-local IPv6 address func macToLinkLocalIPv6(mac net.HardwareAddr) (net.IP, error) { if len(mac) != 6 { - return nil, fmt.Errorf("invalid MAC address length") + return nil, errors.New("invalid MAC address length") } // Create EUI-64 format @@ -1123,7 +1123,7 @@ func configureNic(link, ip string, macAddr net.HardwareAddr, mtu int, detectIPCo if ipv6LinkLocalOn && !isIPv6LinkLocalExist { linkLocal, err := macToLinkLocalIPv6(macAddr) if err != nil { - return fmt.Errorf("failed to generate link-local address: %v", err) + return fmt.Errorf("failed to generate link-local address: %w", err) } ipAddMap[linkLocal.String()] = netlink.Addr{ IPNet: &net.IPNet{