MCPcopy Create free account
hub / github.com/modelcontextprotocol/go-sdk / getCursor

Function getCursor

mcp/server_test.go:61–67  ·  view source on GitHub ↗

getCursor encodes a string input into a URL-safe base64 cursor, fatally logging any encoding errors.

(input string)

Source from the content-addressed store, hash-verified

59// getCursor encodes a string input into a URL-safe base64 cursor,
60// fatally logging any encoding errors.
61func getCursor(input string) string {
62 cursor, err := encodeCursor(input)
63 if err != nil {
64 log.Fatalf("encodeCursor(%s) error = %v", input, err)
65 }
66 return cursor
67}
68
69func TestServerPaginateBasic(t *testing.T) {
70 testCases := []struct {

Callers 1

TestServerPaginateBasicFunction · 0.85

Calls 1

encodeCursorFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…