diff --git a/links/endpoint_host.go b/links/endpoint_host.go index dd885c96e..943ef460e 100644 --- a/links/endpoint_host.go +++ b/links/endpoint_host.go @@ -13,7 +13,7 @@ func NewEndpointHost(eg *EndpointGeneric) *EndpointHost { } func (e *EndpointHost) Verify(_ *VerifyLinkParams) error { - errs := []error{} + var errs []error err := CheckEndpointUniqueness(e) if err != nil { errs = append(errs, err) diff --git a/links/endpoint_vxlan.go b/links/endpoint_vxlan.go index 88edbcea1..a12fe247d 100644 --- a/links/endpoint_vxlan.go +++ b/links/endpoint_vxlan.go @@ -28,9 +28,7 @@ func (e *EndpointVxlan) String() string { return fmt.Sprintf("vxlan remote: %q, udp-port: %d, vni: %d", e.remote, e.udpPort, e.vni) } -// // GetLink retrieves the link that the endpoint is assigned to -// func (e *EndpointVxlan) GetLink() Link -// // Verify verifies that the endpoint is valid and can be deployed +// Verify verifies that the endpoint is valid and can be deployed func (e *EndpointVxlan) Verify(*VerifyLinkParams) error { return CheckEndpointUniqueness(e) } diff --git a/links/generic_link_node.go b/links/generic_link_node.go index a5fd1bf54..6fe10e688 100644 --- a/links/generic_link_node.go +++ b/links/generic_link_node.go @@ -55,7 +55,7 @@ func (g *GenericLinkNode) GetEndpoints() []Endpoint { return g.endpoints } -func (g *GenericLinkNode) GetState() state.NodeState { +func (*GenericLinkNode) GetState() state.NodeState { // The GenericLinkNode is the basis for Mgmt-Bridge and Host fake node. // Both of these do generally exist. Hence the Deployed state in generally returned return state.Deployed diff --git a/links/link_veth_test.go b/links/link_veth_test.go index 7d0b0a214..58a5be6af 100644 --- a/links/link_veth_test.go +++ b/links/link_veth_test.go @@ -241,6 +241,6 @@ func (f *fakeNode) GetState() state.NodeState { return f.State } -func (f *fakeNode) Delete(ctx context.Context) error { +func (*fakeNode) Delete(context.Context) error { return nil } diff --git a/links/link_vxlan.go b/links/link_vxlan.go index 9ee67a717..228343849 100644 --- a/links/link_vxlan.go +++ b/links/link_vxlan.go @@ -252,7 +252,7 @@ func (lr *LinkVxlanRaw) resolveRegular(params *ResolveParams) (Link, error) { return link, nil } -func (lr *LinkVxlanRaw) GetType() LinkType { +func (*LinkVxlanRaw) GetType() LinkType { return LinkTypeVxlan } @@ -348,6 +348,6 @@ func (l *LinkVxlan) GetEndpoints() []Endpoint { return []Endpoint{l.localEndpoint, l.remoteEndpoint} } -func (l *LinkVxlan) GetType() LinkType { +func (*LinkVxlan) GetType() LinkType { return LinkTypeVxlan } diff --git a/links/link_vxlan_stitched.go b/links/link_vxlan_stitched.go index 28ba43713..10fc6abe9 100644 --- a/links/link_vxlan_stitched.go +++ b/links/link_vxlan_stitched.go @@ -71,7 +71,7 @@ func (l *VxlanStitched) GetEndpoints() []Endpoint { return []Endpoint{l.vxlanLink.localEndpoint, l.vxlanLink.remoteEndpoint} } -func (l *VxlanStitched) GetType() LinkType { +func (*VxlanStitched) GetType() LinkType { return LinkTypeVxlanStitch }