mirror of
https://gitea.com/gitea/gitea-mcp.git
synced 2025-08-23 14:23:05 +00:00
style: refactor code formatting for clarity and conciseness
- Remove extra blank lines for cleaner code formatting - Combine variable declaration of GetGiteaMCPServerVersionTool into a single line for clarity Signed-off-by: appleboy <appleboy.tw@gmail.com>
This commit is contained in:
@@ -25,7 +25,6 @@ const (
|
||||
EditIssueToolName = "edit_issue"
|
||||
EditIssueCommentToolName = "edit_issue_comment"
|
||||
GetIssueCommentsByIndexToolName = "get_issue_comments_by_index"
|
||||
|
||||
)
|
||||
|
||||
var (
|
||||
@@ -289,7 +288,6 @@ func EditIssueFn(ctx context.Context, req mcp.CallToolRequest) (*mcp.CallToolRes
|
||||
return to.TextResult(issue)
|
||||
}
|
||||
|
||||
|
||||
func EditIssueCommentFn(ctx context.Context, req mcp.CallToolRequest) (*mcp.CallToolResult, error) {
|
||||
log.Debugf("Called EditIssueCommentFn")
|
||||
owner, ok := req.GetArguments()["owner"].(string)
|
||||
@@ -317,7 +315,6 @@ func EditIssueCommentFn(ctx context.Context, req mcp.CallToolRequest) (*mcp.Call
|
||||
}
|
||||
|
||||
return to.TextResult(issueComment)
|
||||
|
||||
}
|
||||
|
||||
func GetIssueCommentsByIndexFn(ctx context.Context, req mcp.CallToolRequest) (*mcp.CallToolResult, error) {
|
||||
|
@@ -19,12 +19,10 @@ const (
|
||||
GetGiteaMCPServerVersion = "get_gitea_mcp_server_version"
|
||||
)
|
||||
|
||||
var (
|
||||
GetGiteaMCPServerVersionTool = mcp.NewTool(
|
||||
var GetGiteaMCPServerVersionTool = mcp.NewTool(
|
||||
GetGiteaMCPServerVersion,
|
||||
mcp.WithDescription("Get Gitea MCP Server Version"),
|
||||
)
|
||||
)
|
||||
|
||||
func init() {
|
||||
Tool.RegisterRead(server.ServerTool{
|
||||
|
Reference in New Issue
Block a user