Start work on making gocritic pass

This commit is contained in:
Kristoffer Dalby 2021-11-14 18:44:37 +01:00
parent ba084b9987
commit 53ed749f45
No known key found for this signature in database
GPG key ID: 09F62DC067465735
6 changed files with 27 additions and 19 deletions

View file

@ -56,7 +56,7 @@ func (h *Hosts) UnmarshalJSON(data []byte) error {
}
for k, v := range hs {
if !strings.Contains(v, "/") {
v = v + "/32"
v += "/32"
}
prefix, err := netaddr.ParseIPPrefix(v)
if err != nil {