- Go, particularly
interface
. - GraphQL - Query language for the Zeabur API.
- go-graphql-client - GraphQL client for Go.
- Cobra - CLI framework.
- Viper - Configuration framework. We use it to unify environment variables, flags, and configuration files.
Familiarity with the following tools will be beneficial:
- Ginkgo - Behavior Driven Development (BDD) test framework.
- Run from Source Code (Recommended)
Run the command you want, e.g., go run cmd/main.go auth login --debug
.
- Build and Run
Use make build
to build the binary.
Run the binary with ./zeabur auth login --debug
.
Run Tests:
- All tests:
make test
. - Specific package test:
cd xxx && go test ./...
orcd xxx && ginkgo .
. - Specific test:
cd xxx && ginkgo -focus xxx
(where xxx is theDescribe
name).
Add Tests (using internal/cmd/auth/login
as an example):
cd internal/cmd/auth/login
.- Run
ginkgo bootstrap
to generate the suite filelogin_suite_test.go
. - Run
ginkgo generate login
to create the test filelogin_test.go
.