{"action":"closed","issue":{"url":"https://api.github.com/repos/Kapeli/Dash-User-Contributions/issues/1125","repository_url":"https://api.github.com/repos/Kapeli/Dash-User-Contributions","labels_url":"https://api.github.com/repos/Kapeli/Dash-User-Contributions/issues/1125/labels{/name}","comments_url":"https://api.github.com/repos/Kapeli/Dash-User-Contributions/issues/1125/comments","events_url":"https://api.github.com/repos/Kapeli/Dash-User-Contributions/issues/1125/events","html_url":"https://github.com/Kapeli/Dash-User-Contributions/issues/1125","id":182409244,"number":1125,"title":"Request: Go Local Docs","user":{"login":"dav-","id":5241697,"avatar_url":"https://avatars.githubusercontent.com/u/5241697?v=3","gravatar_id":"","url":"https://api.github.com/users/dav-","html_url":"https://github.com/dav-","followers_url":"https://api.github.com/users/dav-/followers","following_url":"https://api.github.com/users/dav-/following{/other_user}","gists_url":"https://api.github.com/users/dav-/gists{/gist_id}","starred_url":"https://api.github.com/users/dav-/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dav-/subscriptions","organizations_url":"https://api.github.com/users/dav-/orgs","repos_url":"https://api.github.com/users/dav-/repos","events_url":"https://api.github.com/users/dav-/events{/privacy}","received_events_url":"https://api.github.com/users/dav-/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-10-12T00:51:12Z","updated_at":"2016-10-12T10:06:50Z","closed_at":"2016-10-12T10:06:50Z","body":"In this issue I'm requesting support for viewing local Golang documentation within Dash, akin to how the `godoc -http` tool works. This isn't directly related to this repo, but since there is no general Dash issue tracker I can find, it seems like the most appropriate place.\r\n\r\n---\r\n\r\n#### Reasoning\r\nA large portion of the documentation I reference on a daily basis is part of private projects with only local documentation. I do reference the public standard/third-party library docs, but my private documentation is what's most important to me because it's ever-changing.\r\n\r\nI am considering writing a script to generate Dash Docsets from my local documentation, but as I've read in [this issue](https://github.com/golang/gddo/issues/149) this seems to be something that other users have requested as well, so I figured I would first request this feature in hopes that it could be implemented natively. If Dash or its relevant components were open source (*hint hint*) I could do it myself and submit a PR, but alas it isn't so I'll have to just beg for the feature instead. \r\n\r\nI really think Go developers would benefit from this feature, and I don't think it should be difficult to implement, especially since you presumably already have a parser for the online Godoc pages. \r\n\r\n#### User Friendliness\r\nThe [major concern you cited](https://github.com/golang/gddo/issues/149#issuecomment-36059937) in that issue I mentioned was user friendliness. I don't believe this would be an issue because with a standard Go environment setup  all packages will be under `$GOPATH/src`. This should apply to 99% of Go devs since it is recommended by the Go documentation and Go is a very minimalism-centric language with strict conventions. From the [Golang.org Workspaces documentation](https://golang.org/doc/code.html#Workspaces):\r\n\r\n> Most Go programmers keep all their Go source code and dependencies in a single workspace.\r\n\r\nThe bottom line is that if it doesn't work for a user, it's because their environment is configured in a non-standard way, OR possibly that they're developing on a remote server over SSH or something. Either way, I would guess that these users should be in the vast minority.\r\n\r\n#### Implementation\r\nIf you examine the [godoc command documentation](https://godoc.org/golang.org/x/tools/cmd/godoc) and mess around with the `godoc` tool, you should be able to see how easy it would be to extract local documentation. \r\n\r\n1. Try running `godoc $GOPATH/src`. This will give you a list of all local top-level directories. (If you have none, just `go get github.com/gorilla/mux` to test it out).\r\n2. Next, pick one of these directories and run `godoc $GOPATH/src/<subdirectory>`. There will probably be more subdirectories. \r\n3. Repeat and you should finally be at the package level (which may even contain additional subdirectories, and so on).\r\n4. Once you reach a package, try running `godoc -html $GOPATH/src/directory/subdirectory/package` , e.g. `godoc -html $GOPATH/src/github.com/gorilla/mux`\r\n5. Viola, the HTML source for the documentation of that package should be printed to STDOUT. Now just run that HTML through whatever parser you've already got built for generating Go Docsets. \r\n\r\nIt would be nice if there was a pane similar to the existing `Dash > Preferences > Third Party Sources > Go Docsets` for local Go packages, or if this feature was integrated into the existing pane. Typing in the search bar would search the local `$GOPATH/src` directories (either using `godoc` or custom filesystem traversal). Dash would then display any matching packages as results which could be installed as Docsets.\r\n\r\nIdeally, there would be some mechanism to update these local Docsets automatically upon changes to the source code, as any in-development packages will change frequently. \r\n\r\n#### Conclusion\r\nTo close, I just want to emphasize how much Go developers LOVE documentation. Anyone using [GoLint](https://github.com/golang/lint) and/or adhering to the official [Effective Go](https://golang.org/doc/effective_go.html#commentary) style should be documenting ALL of their exported types, fields, methods, functions, etc.\r\n\r\nWe all currently have to rely on the nice but somewhat lacking Godoc documentation, but it's not very pretty, it doesn't integrate with other documentation (like JS/HTML/SQL/etc, which we often use simultaneously), etc. Dash is much nicer, and I think you have a large potential market of developers who would love to purchase your product if was fully integrated with our workflows."}}
{"actor":{"display_login":"Kapeli"}}