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

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ningzio
Copy link

@ningzio ningzio commented Aug 31, 2024

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

  • use go env GOMOD to determine whether the project is a go module.
  • check if the project is inside of a go workspace, if it does, it will use go work use . to add the project to go.work.

@kevwan kevwan requested a review from kesonan September 1, 2024 07:19
Copy link

codecov bot commented Sep 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

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

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


#3420

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

Successfully merging this pull request may close these issues.

2 participants