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.
This commit is contained in:
parent
8c42b69817
commit
ef2fc60b5c
2 changed files with 10 additions and 2 deletions
|
|
@ -66,7 +66,11 @@ type Output struct {
|
||||||
Greeting string `json:"greeting" jsonschema:"the greeting to tell to the user"`
|
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
|
return nil, Output{Greeting: "Hi " + input.Name}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,11 @@ type Output struct {
|
||||||
Greeting string `json:"greeting" jsonschema:"the greeting to tell to the user"`
|
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
|
return nil, Output{Greeting: "Hi " + input.Name}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue