1
0

chore: golangci-lint update.

This commit is contained in:
Xavier Michelon
2024-07-11 11:14:23 +02:00
parent 5d3f084a2b
commit fc64dbec59
33 changed files with 157 additions and 158 deletions

View File

@ -581,7 +581,7 @@ func validateServerToken(ctx context.Context, wantToken string) error {
// newUnaryTokenValidator checks the server token for every unary gRPC call.
func newUnaryTokenValidator(wantToken string) grpc.UnaryServerInterceptor {
return func(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error) {
return func(ctx context.Context, req interface{}, _ *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error) {
if err := validateServerToken(ctx, wantToken); err != nil {
return nil, err
}
@ -592,7 +592,7 @@ func newUnaryTokenValidator(wantToken string) grpc.UnaryServerInterceptor {
// newStreamTokenValidator checks the server token for every gRPC stream request.
func newStreamTokenValidator(wantToken string) grpc.StreamServerInterceptor {
return func(srv interface{}, stream grpc.ServerStream, info *grpc.StreamServerInfo, handler grpc.StreamHandler) error {
return func(srv interface{}, stream grpc.ServerStream, _ *grpc.StreamServerInfo, handler grpc.StreamHandler) error {
if err := validateServerToken(stream.Context(), wantToken); err != nil {
return err
}
@ -626,9 +626,7 @@ func (s *Service) monitorParentPID() {
go func() {
defer async.HandlePanic(s.panicHandler)
if err := s.quit(); err != nil {
logrus.WithError(err).Error("Error on quit")
}
s.quit()
}()
}