hello

command
v1.21.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 3, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Hello, zip — minimal example.

go run ./examples/hello
curl http://localhost:8080/hello
curl http://localhost:8080/.well-known/openapi.json   # the same two ops
curl -XPOST -d '{"method":"tools/list"}' http://localhost:8080/mcp

Both routes are TYPED ops, which is the default. zip.Get[In, Out] registers ONE operation, and zip projects it into the REST route, the OpenAPI document, an MCP tool, a `<service> <operation>` command line and a by-name call plane. An untyped app.Get(path, func(c *zip.Ctx) error) registers no operation and therefore appears in NONE of them — see examples/sse-streaming for the case where that is still the right trade.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL