Skip to content

Commit 6c9bd78

Browse files
committed
chore: remove duplicate tidy
1 parent 15b39cb commit 6c9bd78

File tree

2 files changed

+0
-42
lines changed

2 files changed

+0
-42
lines changed

src/tools/__tests__/goTools.test.ts

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -174,15 +174,4 @@ describe('Go Tools', () => {
174174
expect(result.content[0].text).toContain('ns/op')
175175
})
176176
})
177-
178-
describe('go_mod_tidy', () => {
179-
it('should clean up dependencies', async () => {
180-
const result = await server.callTool('go_mod_tidy', {
181-
wd: testWorkingDir
182-
})
183-
184-
expect(result.content[0].type).toBe('text')
185-
expect(result.content[0].text).toContain('Dependencies cleaned up successfully')
186-
})
187-
})
188177
})

src/tools/goTools.ts

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -409,35 +409,4 @@ export function registerGoTools(server: McpServer): void {
409409
}
410410
}
411411
)
412-
413-
// Tool: Run go mod tidy
414-
server.tool(
415-
'go_mod_tidy',
416-
{
417-
wd: z.string().describe('Working directory where the command will be executed (should contain go.mod file)')
418-
},
419-
async ({ wd }: { wd: string }) => {
420-
// Validate that working directory is an absolute path
421-
if (!isAbsolutePath(wd)) {
422-
return createWdError(wd)
423-
}
424-
425-
try {
426-
return executeGoCommand(
427-
'go mod tidy',
428-
wd,
429-
'Dependencies cleaned up successfully'
430-
)
431-
} catch (error) {
432-
console.error('Error running go mod tidy:', error)
433-
return {
434-
content: [{
435-
type: 'text' as const,
436-
text: `Error running go mod tidy: ${error instanceof Error ? error.message : String(error)}`
437-
}],
438-
isError: true
439-
}
440-
}
441-
}
442-
)
443412
}

0 commit comments

Comments
 (0)