- Go, especially
interface
. - graphql - Query language for Zeabur API
- go-graphql-client - GraphQL client for Go
- Cobra - CLI framework
- Viper - Configuration framework. We use it to unify env, flag, config file.
If you also know the following tools, it will be better.
- GinkGo - "Behavior Driven Development" (BDD) test framework
- mockery - A mock code autogenerator for Go
- Run from source code(Recommended)
make mock
first to generate mock code.(Regenerate mock code when you change the interface)
then run the cmd you want, e.g. go run cmd/main.go auth login --debug
- Build and run
make build
to build the binary.
./zeabur auth login --debug
to run the binary.
Run Tests:
- all tests:
make test
- specific pkg test:
cd xxx && go test ./...
orcd xxx && ginkgo .
- specific test:
cd xxx && ginkgo -focus xxx
(xxx isDescribe
name)
Add Tests(ineternal/cmd/auth/login
as example):
cd internal/cmd/auth/login
ginkgo bootstrap
to generate suite filelogin_suite_test.go
ginkgo generate login
to generate test filelogin_test.go