From c32a79b73b9b457ec37164f6ff753a00226ada48 Mon Sep 17 00:00:00 2001 From: Johnny Date: Thu, 11 Dec 2025 19:37:53 +0800 Subject: [PATCH] fix: resolve golangci-lint errors - Add periods to end of multi-line comments (godot) - Omit unused receiver names in methods (revive) --- server/router/api/v1/acl.go | 2 +- server/router/api/v1/connect_handler.go | 2 +- server/router/api/v1/connect_interceptors.go | 14 +++++++------- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/server/router/api/v1/acl.go b/server/router/api/v1/acl.go index c9e33dd05..a6acb8341 100644 --- a/server/router/api/v1/acl.go +++ b/server/router/api/v1/acl.go @@ -49,7 +49,7 @@ func NewGRPCAuthInterceptor(store *store.Store, secret string) *GRPCAuthIntercep // On successful authentication, context values are set: // - auth.UserIDContextKey: The authenticated user's ID // - auth.SessionIDContextKey: Session ID (cookie auth only) -// - auth.AccessTokenContextKey: JWT token (bearer auth only) +// - auth.AccessTokenContextKey: JWT token (bearer auth only). func (in *GRPCAuthInterceptor) AuthenticationInterceptor(ctx context.Context, request any, serverInfo *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (any, error) { md, ok := metadata.FromIncomingContext(ctx) if !ok { diff --git a/server/router/api/v1/connect_handler.go b/server/router/api/v1/connect_handler.go index cf25f7014..b1cca529d 100644 --- a/server/router/api/v1/connect_handler.go +++ b/server/router/api/v1/connect_handler.go @@ -17,7 +17,7 @@ import ( // This wrapper pattern allows us to: // - Reuse existing gRPC service implementations // - Support both native gRPC and Connect protocols -// - Maintain a single source of truth for business logic +// - Maintain a single source of truth for business logic. type ConnectServiceHandler struct { *APIV1Service } diff --git a/server/router/api/v1/connect_interceptors.go b/server/router/api/v1/connect_interceptors.go index a16a4904a..71130b928 100644 --- a/server/router/api/v1/connect_interceptors.go +++ b/server/router/api/v1/connect_interceptors.go @@ -35,11 +35,11 @@ func (in *LoggingInterceptor) WrapUnary(next connect.UnaryFunc) connect.UnaryFun } } -func (in *LoggingInterceptor) WrapStreamingClient(next connect.StreamingClientFunc) connect.StreamingClientFunc { +func (*LoggingInterceptor) WrapStreamingClient(next connect.StreamingClientFunc) connect.StreamingClientFunc { return next // No-op for server-side interceptor } -func (in *LoggingInterceptor) WrapStreamingHandler(next connect.StreamingHandlerFunc) connect.StreamingHandlerFunc { +func (*LoggingInterceptor) WrapStreamingHandler(next connect.StreamingHandlerFunc) connect.StreamingHandlerFunc { return next // Streaming not used in this service } @@ -55,7 +55,7 @@ func (in *LoggingInterceptor) log(procedure string, err error) { slog.LogAttrs(context.Background(), level, msg, attrs...) } -func (in *LoggingInterceptor) classifyError(err error) (slog.Level, string) { +func (*LoggingInterceptor) classifyError(err error) (slog.Level, string) { if err == nil { return slog.LevelInfo, "OK" } @@ -106,11 +106,11 @@ func (in *RecoveryInterceptor) WrapUnary(next connect.UnaryFunc) connect.UnaryFu } } -func (in *RecoveryInterceptor) WrapStreamingClient(next connect.StreamingClientFunc) connect.StreamingClientFunc { +func (*RecoveryInterceptor) WrapStreamingClient(next connect.StreamingClientFunc) connect.StreamingClientFunc { return next } -func (in *RecoveryInterceptor) WrapStreamingHandler(next connect.StreamingHandlerFunc) connect.StreamingHandlerFunc { +func (*RecoveryInterceptor) WrapStreamingHandler(next connect.StreamingHandlerFunc) connect.StreamingHandlerFunc { return next } @@ -180,11 +180,11 @@ func (in *AuthInterceptor) WrapUnary(next connect.UnaryFunc) connect.UnaryFunc { } } -func (in *AuthInterceptor) WrapStreamingClient(next connect.StreamingClientFunc) connect.StreamingClientFunc { +func (*AuthInterceptor) WrapStreamingClient(next connect.StreamingClientFunc) connect.StreamingClientFunc { return next } -func (in *AuthInterceptor) WrapStreamingHandler(next connect.StreamingHandlerFunc) connect.StreamingHandlerFunc { +func (*AuthInterceptor) WrapStreamingHandler(next connect.StreamingHandlerFunc) connect.StreamingHandlerFunc { return next }