diff --git a/internal/router/ddwrt.go b/internal/router/ddwrt.go index 52a5732..3fe89a9 100644 --- a/internal/router/ddwrt.go +++ b/internal/router/ddwrt.go @@ -12,7 +12,8 @@ const ( nvramRCStartupKey = "rc_startup" ) -var ddwrtJffs2NotEnabledErr = errors.New(`could not install service without jffs, follow this guide to enable: +// lint:ignore ST1005 This error is for human. +var errDdwrtJffs2NotEnabled = errors.New(`could not install service without jffs, follow this guide to enable: https://wiki.dd-wrt.com/wiki/index.php/Journalling_Flash_File_System `) diff --git a/internal/router/router.go b/internal/router/router.go index 1e330b4..c8beac7 100644 --- a/internal/router/router.go +++ b/internal/router/router.go @@ -84,7 +84,7 @@ func ConfigureService(sc *service.Config) error { switch name { case DDWrt: if !ddwrtJff2Enabled() { - return ddwrtJffs2NotEnabledErr + return errDdwrtJffs2NotEnabled } case OpenWrt: sc.Option["SysvScript"] = openWrtScript diff --git a/resolver.go b/resolver.go index 1e07c78..befa298 100644 --- a/resolver.go +++ b/resolver.go @@ -143,7 +143,7 @@ func lookupIP(domain string, timeout int, withBootstrapDNS bool) (ips []string) ProxyLog.Debug().Msgf("Resolving %q using bootstrap DNS %q", domain, resolver.nameservers) timeoutMs := 2000 if timeout > 0 && timeout < timeoutMs { - timeoutMs = timeoutMs + timeoutMs = timeout } questionDomain := dns.Fqdn(domain) ipFromRecord := func(record dns.RR) string {