File tree Expand file tree Collapse file tree 3 files changed +5
-15
lines changed Expand file tree Collapse file tree 3 files changed +5
-15
lines changed Original file line number Diff line number Diff line change 22// Use of this source code is governed by an MIT-style
33// license that can be found in the LICENSE file.
44
5- package mcp_test
5+ package main
66
77import (
88 "context"
@@ -15,10 +15,9 @@ var nextProgressToken atomic.Int64
1515
1616// This middleware function adds a progress token to every outgoing request
1717// from the client.
18- func Example_progressMiddleware () {
19- c := mcp .NewClient (testImpl , nil )
18+ func main () {
19+ c := mcp .NewClient (& mcp. Implementation { Name : "test" } , nil )
2020 c .AddSendingMiddleware (addProgressToken [* mcp .ClientSession ])
21- _ = c
2221}
2322
2423func addProgressToken [S mcp.Session ](h mcp.MethodHandler ) mcp.MethodHandler {
Original file line number Diff line number Diff line change 22// Use of this source code is governed by an MIT-style
33// license that can be found in the LICENSE file.
44
5- package mcp_test
5+ package main
66
77import (
88 "context"
@@ -16,7 +16,7 @@ import (
1616)
1717
1818// This example demonstrates server side logging using the mcp.Middleware system.
19- func Example_loggingMiddleware () {
19+ func main () {
2020 // Create a logger for demonstration purposes.
2121 logger := slog .New (slog .NewTextHandler (os .Stdout , & slog.HandlerOptions {
2222 Level : slog .LevelInfo ,
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments