Skip to content

Commit

Permalink
Fix linter
Browse files Browse the repository at this point in the history
  • Loading branch information
michel-laterman committed Apr 26, 2024
1 parent 50fd956 commit ee0b705
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion x-pack/elastic-agent/pkg/core/server/server.go
Expand Up @@ -8,6 +8,7 @@ import (
"crypto/tls"
"crypto/x509"
"encoding/json"
stderr "errors"
"fmt"
"io"
"net"
Expand Down Expand Up @@ -152,6 +153,7 @@ func (s *Server) Start() error {
if ok := certPool.AppendCertsFromPEM(s.ca.Crt()); !ok {
return errors.New("failed to append root CA", errors.TypeSecurity)
}
//nolint:gosec // G402: TLS MinVersion too low.
creds := credentials.NewTLS(&tls.Config{
ClientAuth: tls.RequireAndVerifyClientCert,
ClientCAs: certPool,
Expand Down Expand Up @@ -984,7 +986,7 @@ type actionResult struct {
}

func reportableErr(err error) bool {
if err == io.EOF {
if stderr.Is(err, io.EOF) {
return false
}
s, ok := status.FromError(err)
Expand Down

0 comments on commit ee0b705

Please sign in to comment.