-
Notifications
You must be signed in to change notification settings - Fork 99
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
Can not generate projects that uses go module #12
Comments
To work around this, we construct a 'fake gopath' using It'd be great to skip this step 😄 |
Yeah, end up with the same hack... |
I tried to generate docs for Kubeflow Notebook Controller, but failed because it uses go module with replace statement. Tried the above work around, but it doesn't work in this case: go.mod is https://github.com/kubeflow/kubeflow/blob/master/components/notebook-controller/go.mod
|
FYI, I fixed this issue by specifying the full package name in the command line. For example,: I think this is how k8s.io gengo and go package works, you have to put into a path that is being imported somewhere. |
Sorry for the silence here, turns out I wasn't watching the repo. /facepalm Yes, your $PWD has to be within the go module, and you should use the Go module path as the package name (I think). Nothing we can fix here. That's how |
Using the full import path also works on my end. This issue can be closed. |
It used to work with a project that set GOPATH properly. But now if a project has enabled go module, generating doc will fail.
Step to reproduce:
refdocs -config ./apidocs/doc-config.json -api-dir "github.com/rancher/rio/pkg/apis/" -out-file ./api-docs.md --template-dir ./apidocs
It will fail
This workflow used to work when we weren't switched to go module.
The text was updated successfully, but these errors were encountered: