This commit is contained in:
Kristoffer Dalby 2022-01-30 08:35:10 +00:00
parent ad4e3a89e0
commit 445c04baf7
2 changed files with 4 additions and 1 deletions

View file

@ -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)

View file

@ -151,6 +151,7 @@ func GetIPPrefixEndpoints(na netaddr.IPPrefix) (network, broadcast netaddr.IP) {
ipRange := na.Range()
network = ipRange.From()
broadcast = ipRange.To()
return
}