all: use strings.Cut even more

Change-Id: I943ce72c6f339589235bddbe10d07799c4e37979
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
Brad Fitzpatrick
2022-03-19 12:42:46 -07:00
committed by Brad Fitzpatrick
parent f30473211b
commit f2041c9088
8 changed files with 14 additions and 25 deletions
+1 -1
View File
@@ -676,7 +676,7 @@ func pfx(strs ...string) (ret []netaddr.IPPrefix) {
func nets(nets ...string) (ret []netaddr.IPPrefix) {
for _, s := range nets {
if i := strings.IndexByte(s, '/'); i == -1 {
if !strings.Contains(s, "/") {
ip, err := netaddr.ParseIP(s)
if err != nil {
panic(err)