From 4c1a37ae714d43b8cf0eeccf2d43d6644855c870 Mon Sep 17 00:00:00 2001 From: xieyuschen Date: Sat, 20 Sep 2025 17:28:05 +0800 Subject: [PATCH] docs: adjust example code to remove horizontal scroll bar This change adjusts the code example in readme so if you view it in github it won't show a horizontal scroll bar in code example. It's trivial change, but I believe it's still an improvement. --- README.md | 6 +++++- internal/readme/server/server.go | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 9263e46b..a12a0267 100644 --- a/README.md +++ b/README.md @@ -66,7 +66,11 @@ type Output struct { Greeting string `json:"greeting" jsonschema:"the greeting to tell to the user"` } -func SayHi(ctx context.Context, req *mcp.CallToolRequest, input Input) (*mcp.CallToolResult, Output, error) { +func SayHi(ctx context.Context, req *mcp.CallToolRequest, input Input) ( + *mcp.CallToolResult, + Output, + error, +) { return nil, Output{Greeting: "Hi " + input.Name}, nil } diff --git a/internal/readme/server/server.go b/internal/readme/server/server.go index e9996027..bfa08254 100644 --- a/internal/readme/server/server.go +++ b/internal/readme/server/server.go @@ -20,7 +20,11 @@ type Output struct { Greeting string `json:"greeting" jsonschema:"the greeting to tell to the user"` } -func SayHi(ctx context.Context, req *mcp.CallToolRequest, input Input) (*mcp.CallToolResult, Output, error) { +func SayHi(ctx context.Context, req *mcp.CallToolRequest, input Input) ( + *mcp.CallToolResult, + Output, + error, +) { return nil, Output{Greeting: "Hi " + input.Name}, nil }