all: fix vet warnings

This commit is contained in:
Brad Fitzpatrick
2020-07-16 08:39:38 -07:00
parent d74c9aa95b
commit 10ac066013
6 changed files with 20 additions and 11 deletions

View File

@@ -185,7 +185,7 @@ func main() {
}
httpsrv.TLSConfig = certManager.TLSConfig()
go func() {
err := http.ListenAndServe(":80", certManager.HTTPHandler(tsweb.Port80Handler{mux}))
err := http.ListenAndServe(":80", certManager.HTTPHandler(tsweb.Port80Handler{Main: mux}))
if err != nil {
if err != http.ErrServerClosed {
log.Fatal(err)

View File

@@ -97,9 +97,9 @@ func parseIPOrCIDR(s string) (wgcfg.CIDR, bool) {
return wgcfg.CIDR{}, false
}
if ip.Is4() {
return wgcfg.CIDR{ip, 32}, true
return wgcfg.CIDR{IP: ip, Mask: 32}, true
} else {
return wgcfg.CIDR{ip, 128}, true
return wgcfg.CIDR{IP: ip, Mask: 128}, true
}
}