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

Project not found in godoc #19

Open
andrealbinop opened this issue Nov 24, 2018 · 3 comments
Open

Project not found in godoc #19

andrealbinop opened this issue Nov 24, 2018 · 3 comments

Comments

@andrealbinop
Copy link

andrealbinop commented Nov 24, 2018

Hello,

It seems godoc can't find this project. My best guess is because there's no go files in this project. However, I'm getting the same behavior in a project of mine which has go files, just not in root directory. You can see by the broken badges in README.md. Any suggestions regarding the best way to solve this? Rethink this aspect of the project structure or check with the guys in godoc to see what can be done over there?

@andrealbinop
Copy link
Author

Taking a better look at other projects with the same problem, stretchr/testify created a go file just to help documentation:

https://github.com/stretchr/testify/blob/master/doc.go

I'll go with this approach for now. Couldn't this project propose something official?

@kcq
Copy link
Member

kcq commented Nov 26, 2018

GoDoc might not have a page for your root directory, but it should have pages for your sub-directories where you have Go code. I've seen it with other projects that don't have any go files in the root directory.

It's ok to have a manually created doc.go in the root directory. doc.go files are pretty common. You can also do something similar to what they do for Go itself where they dump the application help info to the alldocs.go file ( here's their shell script: https://github.com/golang/go/blob/master/src/cmd/go/mkalldocs.sh )

@rcoreilly
Copy link

btw I encountered the same problem, and filed an issue: golang/gddo#618 -- also came up with the same workaround of creating a doc.go file at root level..

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

3 participants