mirror of
https://github.com/coredns/coredns.git
synced 2025-10-27 08:14:18 -04:00
Some golint cleanup (#674)
This commit fixes some golint issues in `core/dnsserver` and `middleware/kubernetes`. Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
This commit is contained in:
@@ -24,7 +24,7 @@ type servergRPC struct {
|
||||
listenAddr net.Addr
|
||||
}
|
||||
|
||||
// NewGRPCServer returns a new CoreDNS GRPC server and compiles all middleware in to it.
|
||||
// NewServergRPC returns a new CoreDNS GRPC server and compiles all middleware in to it.
|
||||
func NewServergRPC(addr string, group []*Config) (*servergRPC, error) {
|
||||
|
||||
s, err := NewServer(addr, group)
|
||||
@@ -144,9 +144,9 @@ func (s *servergRPC) Query(ctx context.Context, in *pb.DnsPacket) (*pb.DnsPacket
|
||||
return &pb.DnsPacket{Msg: packed}, nil
|
||||
}
|
||||
|
||||
func (g *servergRPC) Shutdown() error {
|
||||
if g.grpcServer != nil {
|
||||
g.grpcServer.Stop()
|
||||
func (s *servergRPC) Shutdown() error {
|
||||
if s.grpcServer != nil {
|
||||
s.grpcServer.Stop()
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ type serverTLS struct {
|
||||
*Server
|
||||
}
|
||||
|
||||
// NewTLSServer returns a new CoreDNS TLS server and compiles all middleware in to it.
|
||||
// NewServerTLS returns a new CoreDNS TLS server and compiles all middleware in to it.
|
||||
func NewServerTLS(addr string, group []*Config) (*serverTLS, error) {
|
||||
|
||||
s, err := NewServer(addr, group)
|
||||
|
||||
@@ -252,6 +252,7 @@ func (s *Server) OnStartupComplete() {
|
||||
}
|
||||
}
|
||||
|
||||
// Tracer ... TODO: Add comment
|
||||
func (s *Server) Tracer() ot.Tracer {
|
||||
if s.trace == nil {
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user