validate object implements the corresponding interface (#3724)
Signed-off-by: zouyee <zounengren@cmss.chinamobile.com>
This commit is contained in:
parent
b8e96b61fc
commit
a74a209129
5 changed files with 20 additions and 0 deletions
|
@ -9,6 +9,7 @@ import (
|
|||
"github.com/coredns/coredns/plugin/pkg/reuseport"
|
||||
"github.com/coredns/coredns/plugin/pkg/transport"
|
||||
|
||||
"github.com/caddyserver/caddy"
|
||||
"github.com/miekg/dns"
|
||||
)
|
||||
|
||||
|
@ -35,6 +36,9 @@ func NewServerTLS(addr string, group []*Config) (*ServerTLS, error) {
|
|||
return &ServerTLS{Server: s, tlsConfig: tlsConfig}, nil
|
||||
}
|
||||
|
||||
// Compile-time check to ensure Server implements the caddy.GracefulServer interface
|
||||
var _ caddy.GracefulServer = &Server{}
|
||||
|
||||
// Serve implements caddy.TCPServer interface.
|
||||
func (s *ServerTLS) Serve(l net.Listener) error {
|
||||
s.m.Lock()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue