Skip to content

Commit 37da173

Browse files
committed
fix lint issues
Signed-off-by: Nimisha Mehta <nimishamehta5@gmail.com>
1 parent 4defaa1 commit 37da173

File tree

7 files changed

+13
-7
lines changed

7 files changed

+13
-7
lines changed

pkg/mcp/apply_resource.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,11 @@ import (
66
"encoding/json"
77
"fmt"
88

9-
"github.com/StacklokLabs/mkp/pkg/types"
109
"github.com/mark3labs/mcp-go/mcp"
1110
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
1211
"k8s.io/apimachinery/pkg/runtime/schema"
12+
13+
"github.com/StacklokLabs/mkp/pkg/types"
1314
)
1415

1516
// HandleApplyResource handles the apply_resource tool

pkg/mcp/delete_resource.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,10 @@ import (
55
"context"
66
"fmt"
77

8-
"github.com/StacklokLabs/mkp/pkg/types"
98
"github.com/mark3labs/mcp-go/mcp"
109
"k8s.io/apimachinery/pkg/runtime/schema"
10+
11+
"github.com/StacklokLabs/mkp/pkg/types"
1112
)
1213

1314
// HandleDeleteResource handles the delete_resource tool

pkg/mcp/get_resource.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,10 @@ import (
55
"encoding/json"
66
"fmt"
77

8-
"github.com/StacklokLabs/mkp/pkg/types"
98
"github.com/mark3labs/mcp-go/mcp"
109
"k8s.io/apimachinery/pkg/runtime/schema"
10+
11+
"github.com/StacklokLabs/mkp/pkg/types"
1112
)
1213

1314
// HandleGetResource handles the get_resource tool

pkg/ratelimit/config.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// Package ratelimit provides rate limiting functionality for the MCP server
12
package ratelimit
23

34
import "github.com/StacklokLabs/mkp/pkg/types"

pkg/ratelimit/mock_tool_handler.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@ func (m *mockSession) SessionID() string {
1515
return m.id
1616
}
1717

18-
func (m *mockSession) NotificationChannel() chan<- mcp.JSONRPCNotification {
18+
func (_ *mockSession) NotificationChannel() chan<- mcp.JSONRPCNotification {
1919
return nil
2020
}
2121

22-
func (m *mockSession) Initialize() {}
22+
func (_ *mockSession) Initialize() {}
2323

24-
func (m *mockSession) Initialized() bool {
24+
func (_ *mockSession) Initialized() bool {
2525
return true
2626
}
2727

@@ -30,6 +30,7 @@ type MockToolHandler struct {
3030
mock.Mock
3131
}
3232

33+
// Handle implements the ToolHandler interface for mock testing
3334
func (m *MockToolHandler) Handle(ctx context.Context, request mcp.CallToolRequest) (*mcp.CallToolResult, error) {
3435
args := m.Called(ctx, request)
3536
return args.Get(0).(*mcp.CallToolResult), args.Error(1)

pkg/ratelimit/ratelimit.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ func WithDefaultLimit(requestsPerMinute int) RateLimiterOption {
5151

5252
// WithTimeWindow sets the time window for rate limiting
5353
func WithTimeWindow(window time.Duration) RateLimiterOption {
54-
return func(rl *RateLimiter) {
54+
return func(_ *RateLimiter) {
5555
windowSize = window
5656
}
5757
}

pkg/types/types.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// Package types contains common type definitions and constants used across the MCP implementation
12
package types
23

34
// Constants for resource types

0 commit comments

Comments
 (0)