Examples
Examples
Section titled “Examples”This section collects practical, runnable examples to help you apply go-zero patterns to real problems.
What’s Included
Section titled “What’s Included”| Example | Difficulty | Description |
|---|---|---|
| Hello World | Beginner | Minimal API service |
| REST API with JWT | Intermediate | Authenticated HTTP endpoints |
| Bookstore | Intermediate | Full-stack API + RPC service |
| Microservice System | Advanced | Multi-service with service discovery |
Running Examples
Section titled “Running Examples”All examples require Go 1.21+ and goctl installed.
go install github.com/zeromicro/go-zero/tools/goctl@latestClone the official example repository:
git clone https://github.com/zeromicro/go-zero.gitcd go-zero/example