From ef2fc60b5cd7d73ddfdb7c9b07047798640a3295 Mon Sep 17 00:00:00 2001 From: Griffin Date: Mon, 22 Sep 2025 21:07:17 +0800 Subject: [PATCH] docs: adjust example code to remove horizontal scroll bar (#509) 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 9263e46..a12a026 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 e999602..bfa0825 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 }