Pull request: all: fix lint and naming issues vol. 2

Merge in DNS/adguard-home from 2276-fix-lint-2 to master

Updates #2276.

Squashed commit of the following:

commit 24760b9586bb31be134ef9518dbece485560b1a0
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date:   Mon Dec 7 14:39:50 2020 +0300

    all: fix lint and naming issues vol. 2
This commit is contained in:
Ainar Garipov
2020-12-07 15:38:05 +03:00
parent a572876775
commit 7f29d4e546
21 changed files with 188 additions and 189 deletions

View File

@@ -52,6 +52,7 @@ type ServerConfig struct {
HTTPRegister func(string, string, func(http.ResponseWriter, *http.Request)) `yaml:"-"`
}
// OnLeaseChangedT is a callback for lease changes.
type OnLeaseChangedT func(flags int)
// flags for onLeaseChanged()
@@ -74,6 +75,7 @@ type Server struct {
onLeaseChanged []OnLeaseChangedT
}
// ServerInterface is an interface for servers.
type ServerInterface interface {
Leases(flags int) []Lease
SetOnLeaseChanged(onLeaseChanged OnLeaseChangedT)