From 445c04baf7817bebbd61e7d1d448e04b8eb88854 Mon Sep 17 00:00:00 2001 From: Kristoffer Dalby Date: Sun, 30 Jan 2022 08:35:10 +0000 Subject: [PATCH] Fix lint --- machine_test.go | 4 +++- utils.go | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/machine_test.go b/machine_test.go index ecb50de3..1cc4d40c 100644 --- a/machine_test.go +++ b/machine_test.go @@ -208,7 +208,9 @@ func (s *Suite) TestSerdeAddressStrignSlice(c *check.C) { }) serialized, err := input.Value() c.Assert(err, check.IsNil) - c.Assert(serialized.(string), check.Equals, "192.0.2.1,2001:db8::1") + if serial, ok := serialized.(string); ok { + c.Assert(serial, check.Equals, "192.0.2.1,2001:db8::1") + } var deserialized MachineAddresses err = deserialized.Scan(serialized) diff --git a/utils.go b/utils.go index babc69f8..9e85599f 100644 --- a/utils.go +++ b/utils.go @@ -151,6 +151,7 @@ func GetIPPrefixEndpoints(na netaddr.IPPrefix) (network, broadcast netaddr.IP) { ipRange := na.Range() network = ipRange.From() broadcast = ipRange.To() + return }