You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to golang-nuts
In my local project folder (a web app) that has the go source files, I use the go run command to get the output. Each of these files is called a package main. I 'd like to create the documentation for the project. I run godoc -http=:6060, but don't see any of the source files of my local project. All I see is the list of subdirectories. What would be the correct way to do the documentation of the local project . Thanks
Shawn Milochik
unread,
Mar 5, 2017, 6:43:12 PM3/5/17
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
You can still only see exported functions. If you pull out the code you want to document into packages (other than "main") then they will be documented normally. You're running into this problem because you're doing something non-standard -- having a bunch of separate "main" applications in a single folder. I don't know how/if the above will work on a folder with multiple files containing "func main," though.
Rejoy
unread,
Mar 6, 2017, 1:00:32 AM3/6/17
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to golang-nuts
Yes, this works and suffices my needs for now. So if I understand right, I should be creating just the single main package and import all other files as packages into the main package. Only then will the documentation show up for my local project as well.