From 584f6505ea873a5b7f9f1358fab5b36f2bb1dc31 Mon Sep 17 00:00:00 2001 From: Igor Sirotin Date: Fri, 19 Dec 2025 00:14:56 +0000 Subject: [PATCH] fix: lint stub --- sds/sds.go | 2 +- sds/sds_lint.go | 18 ++++++++++++------ 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/sds/sds.go b/sds/sds.go index 985cbc8..30d4e8f 100644 --- a/sds/sds.go +++ b/sds/sds.go @@ -137,8 +137,8 @@ import ( "sync" "unsafe" - "go.uber.org/zap" errorspkg "github.com/pkg/errors" + "go.uber.org/zap" ) var ( diff --git a/sds/sds_lint.go b/sds/sds_lint.go index ec9317a..ce2e529 100644 --- a/sds/sds_lint.go +++ b/sds/sds_lint.go @@ -2,7 +2,11 @@ package sds -import "errors" +import ( + "errors" + + "go.uber.org/zap" +) // This file provides lint-only stubs that avoid requiring libsds.h/cgo // so linters can analyze this package without native dependencies. @@ -11,8 +15,8 @@ import "errors" var ErrLintBuild = errors.New("sds: lint-only build stub: native libsds not linked") // NewReliabilityManager returns an error in lint builds. -func NewReliabilityManager() (*ReliabilityManager, error) { - return nil, ErrLintBuild +func NewReliabilityManager(logger *zap.Logger) (*ReliabilityManager, error) { + return nil, ErrLintBuild } // Cleanup returns an error in lint builds. @@ -23,16 +27,18 @@ func (rm *ReliabilityManager) Reset() error { return ErrLintBuild } // WrapOutgoingMessage returns an error in lint builds. func (rm *ReliabilityManager) WrapOutgoingMessage(message []byte, messageId MessageID, channelId string) ([]byte, error) { - return nil, ErrLintBuild + return nil, ErrLintBuild } // UnwrapReceivedMessage returns an error in lint builds. func (rm *ReliabilityManager) UnwrapReceivedMessage(message []byte) (*UnwrappedMessage, error) { - return nil, ErrLintBuild + return nil, ErrLintBuild } // MarkDependenciesMet returns an error in lint builds. -func (rm *ReliabilityManager) MarkDependenciesMet(messageIDs []MessageID, channelId string) error { return ErrLintBuild } +func (rm *ReliabilityManager) MarkDependenciesMet(messageIDs []MessageID, channelId string) error { + return ErrLintBuild +} // StartPeriodicTasks returns an error in lint builds. func (rm *ReliabilityManager) StartPeriodicTasks() error { return ErrLintBuild }