From 1f5ab1b795e8f7a7e1d52bcc102c925c68921516 Mon Sep 17 00:00:00 2001 From: Mechiel Lukkien Date: Mon, 22 May 2023 15:04:06 +0200 Subject: [PATCH] fix language in comments found through goreportcard.com --- config/config.go | 4 ++-- config/doc.go | 4 ++-- main.go | 2 +- ratelimit/ratelimit.go | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/config/config.go b/config/config.go index 7abbe00..19e80ba 100644 --- a/config/config.go +++ b/config/config.go @@ -136,12 +136,12 @@ type Listener struct { Enabled bool Port int `sconf:"optional" sconf-doc:"Default 80."` Path string `sconf:"optional" sconf-doc:"Path to serve admin requests on, e.g. /moxadmin/. Useful if domain serves other resources. Default is /admin/."` - } `sconf:"optional" sconf-doc:"Admin web interface, for managing domains, accounts, etc. Served at /admin/. Preferrably only enable on non-public IPs. Hint: use 'ssh -L 8080:localhost:80 you@yourmachine' and open http://localhost:8080/admin/, or set up a tunnel (e.g. WireGuard) and add its IP to the mox 'internal' listener."` + } `sconf:"optional" sconf-doc:"Admin web interface, for managing domains, accounts, etc. Served at /admin/. Preferably only enable on non-public IPs. Hint: use 'ssh -L 8080:localhost:80 you@yourmachine' and open http://localhost:8080/admin/, or set up a tunnel (e.g. WireGuard) and add its IP to the mox 'internal' listener."` AdminHTTPS struct { Enabled bool Port int `sconf:"optional" sconf-doc:"Default 443."` Path string `sconf:"optional" sconf-doc:"Path to serve admin requests on, e.g. /moxadmin/. Useful if domain serves other resources. Default is /admin/."` - } `sconf:"optional" sconf-doc:"Admin web interface listener for HTTPS. Requires a TLS config. Preferrably only enable on non-public IPs."` + } `sconf:"optional" sconf-doc:"Admin web interface listener for HTTPS. Requires a TLS config. Preferably only enable on non-public IPs."` MetricsHTTP struct { Enabled bool Port int `sconf:"optional" sconf-doc:"Default 8010."` diff --git a/config/doc.go b/config/doc.go index cfad2d2..61ff20a 100644 --- a/config/doc.go +++ b/config/doc.go @@ -234,7 +234,7 @@ describe-static" and "mox config describe-domains": Path: # Admin web interface, for managing domains, accounts, etc. Served at /admin/. - # Preferrably only enable on non-public IPs. Hint: use 'ssh -L 8080:localhost:80 + # Preferably only enable on non-public IPs. Hint: use 'ssh -L 8080:localhost:80 # you@yourmachine' and open http://localhost:8080/admin/, or set up a tunnel (e.g. # WireGuard) and add its IP to the mox 'internal' listener. (optional) AdminHTTP: @@ -247,7 +247,7 @@ describe-static" and "mox config describe-domains": # resources. Default is /admin/. (optional) Path: - # Admin web interface listener for HTTPS. Requires a TLS config. Preferrably only + # Admin web interface listener for HTTPS. Requires a TLS config. Preferably only # enable on non-public IPs. (optional) AdminHTTPS: Enabled: false diff --git a/main.go b/main.go index d94e032..685022a 100644 --- a/main.go +++ b/main.go @@ -992,7 +992,7 @@ WARNING: Bots will try to bruteforce your password. Connections with failed authentication attempts will be rate limited but attackers WILL find weak passwords. If your account is compromised, spammers are likely to abuse your system, spamming your address and the wider internet in your name. So please -pick a random, unguessable password, preferrably at least 12 characters. +pick a random, unguessable password, preferably at least 12 characters. `) fmt.Printf("password: ") diff --git a/ratelimit/ratelimit.go b/ratelimit/ratelimit.go index 450cdb7..6f5914b 100644 --- a/ratelimit/ratelimit.go +++ b/ratelimit/ratelimit.go @@ -84,7 +84,7 @@ func (l *Limiter) checkAdd(add bool, ip net.IP, tm time.Time, n int64) bool { return true } -// Reset sets the counter to 0 for key and ip, and substracts from the ipmasked counts. +// Reset sets the counter to 0 for key and ip, and subtracts from the ipmasked counts. func (l *Limiter) Reset(ip net.IP, tm time.Time) { l.Lock() defer l.Unlock()