Skip to content

Examples

This section collects practical, runnable examples to help you apply go-zero patterns to real problems.

ExampleDifficultyDescription
Hello WorldBeginnerMinimal API service
REST API with JWTIntermediateAuthenticated HTTP endpoints
BookstoreIntermediateFull-stack API + RPC service
Microservice SystemAdvancedMulti-service with service discovery

All examples require Go 1.21+ and goctl installed.

Terminal window
go install github.com/zeromicro/go-zero/tools/goctl@latest

Clone the official example repository:

Terminal window
git clone https://github.com/zeromicro/go-zero.git
cd go-zero/example