Skip to content

Commit 58ec448

Browse files
committed
Lint the code
1 parent 3223581 commit 58ec448

File tree

4 files changed

+10
-11
lines changed

4 files changed

+10
-11
lines changed

internal/ghmcp/server.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,8 @@ func NewMCPServer(cfg MCPServerConfig) (*server.MCPServer, error) {
118118

119119
// Generate instructions based on enabled toolsets
120120
instructions := github.GenerateInstructions(enabledToolsets)
121-
122-
ghServer := github.NewServer(cfg.Version,
121+
122+
ghServer := github.NewServer(cfg.Version,
123123
server.WithInstructions(instructions),
124124
server.WithHooks(hooks),
125125
)

pkg/github/instructions.go

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,21 @@ func GenerateInstructions(enabledToolsets []string) string {
1212
if os.Getenv("DISABLE_INSTRUCTIONS") == "true" {
1313
return "" // Baseline mode
1414
}
15-
15+
1616
var instructions []string
17-
17+
1818
// Core instruction - always included if context toolset enabled
1919
if slices.Contains(enabledToolsets, "context") {
2020
instructions = append(instructions, "Always call 'get_me' first to understand current user permissions and context.")
2121
}
22-
22+
2323
// Individual toolset instructions
2424
for _, toolset := range enabledToolsets {
2525
if inst := getToolsetInstructions(toolset); inst != "" {
2626
instructions = append(instructions, inst)
2727
}
2828
}
29-
29+
3030
// Base instruction with context management
3131
baseInstruction := `The GitHub MCP Server provides tools to interact with GitHub platform.
3232
@@ -40,7 +40,7 @@ Context management:
4040

4141
allInstructions := []string{baseInstruction}
4242
allInstructions = append(allInstructions, instructions...)
43-
43+
4444
return strings.Join(allInstructions, " ")
4545
}
4646

@@ -57,4 +57,3 @@ func getToolsetInstructions(toolset string) string {
5757
return ""
5858
}
5959
}
60-

pkg/github/instructions_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,4 +163,4 @@ func TestGetToolsetInstructions(t *testing.T) {
163163
}
164164
})
165165
}
166-
}
166+
}

pkg/github/projects_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1188,7 +1188,7 @@ func Test_DeleteProjectItem(t *testing.T) {
11881188
mockedClient: mock.NewMockedHTTPClient(
11891189
mock.WithRequestMatchHandler(
11901190
mock.EndpointPattern{Pattern: "/orgs/{org}/projectsV2/{project}/items/{item_id}", Method: http.MethodDelete},
1191-
http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
1191+
http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) {
11921192
w.WriteHeader(http.StatusNoContent)
11931193
}),
11941194
),
@@ -1206,7 +1206,7 @@ func Test_DeleteProjectItem(t *testing.T) {
12061206
mockedClient: mock.NewMockedHTTPClient(
12071207
mock.WithRequestMatchHandler(
12081208
mock.EndpointPattern{Pattern: "/users/{user}/projectsV2/{project}/items/{item_id}", Method: http.MethodDelete},
1209-
http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
1209+
http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) {
12101210
w.WriteHeader(http.StatusNoContent)
12111211
}),
12121212
),

0 commit comments

Comments
 (0)