Skip to content

Hello World

The canonical entry point for any new go-zero developer.

  • Go 1.21+
  • goctl installed
Terminal window
goctl api new greet
cd greet
go mod tidy
greet/
├── etc/
│ └── greet-api.yaml
├── internal/
│ ├── config/
│ ├── handler/
│ ├── logic/
│ ├── svc/
│ └── types/
└── greet.go
Terminal window
go run greet.go
Terminal window
curl http://localhost:8888/from/you
# {"message":"Hello you"}