Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

goctl generate unit test code #4442

Open
studyzy opened this issue Nov 1, 2024 · 0 comments
Open

goctl generate unit test code #4442

studyzy opened this issue Nov 1, 2024 · 0 comments

Comments

@studyzy
Copy link

studyzy commented Nov 1, 2024

Need goctl api go generate unit test code at the same time.

UT for:

  • handler
  • logic

By default, disable this option, use -withtest true to enable. For example:

goctl api go --style go_zero -api example.api  -dir . -withtest true

generate files:

internal
├── config
│   └── config.go
├── handler
│   ├── login
│   │   ├── register_handler.go
│   │   └── register_handler_test.go
│   └── routes.go
├── logic
│   └── login
│       ├── register_logic.go
│       └── register_logic_test.go
├── svc
│   └── service_context.go
└── types
    └── types.go

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant