zeromicro / go-zero

A cloud-native Go microservices framework with cli tool for productivity.
https://go-zero.dev
MIT License
29.41k stars 3.97k forks source link

feat(goctl): support go work (#4332) #4344

Open ningzio opened 3 months ago

ningzio commented 3 months ago

this PR fixed the error no matched module when using goctl api inside of a go workspace.

in go workspace, command go list -m -f '{{.GoMod}}' only lists modules declared in go.work, so goctl can't can the go.mod path even it's already initilized if the project is not in go.work.

to fix this, goctl should

codecov[bot] commented 2 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 95.02%. Comparing base (8690859) to head (5067951). Report is 130 commits behind head on master.

Additional details and impacted files [see 255 files with indirect coverage changes](https://app.codecov.io/gh/zeromicro/go-zero/pull/4344/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=zeromicro)
Issues-translate-bot commented 2 months ago

Bot detected the issue body's language is not English, translate it automatically. πŸ‘―πŸ‘­πŸ»πŸ§‘β€πŸ€β€πŸ§‘πŸ‘«πŸ§‘πŸΏβ€πŸ€β€πŸ§‘πŸ»πŸ‘©πŸΎβ€πŸ€β€πŸ‘¨πŸΏπŸ‘¬πŸΏ


3420