{"id":16630945,"url":"https://github.com/zmb3/gogetdoc","last_synced_at":"2025-04-06T12:09:19.978Z","repository":{"id":57480422,"uuid":"51041014","full_name":"zmb3/gogetdoc","owner":"zmb3","description":"Gets documentation for items in Go source code.","archived":false,"fork":false,"pushed_at":"2019-02-28T00:26:58.000Z","size":270,"stargazers_count":185,"open_issues_count":7,"forks_count":25,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-03-30T11:07:04.652Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zmb3.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-02-04T00:24:41.000Z","updated_at":"2025-01-02T11:44:17.000Z","dependencies_parsed_at":"2022-09-26T17:41:41.988Z","dependency_job_id":null,"html_url":"https://github.com/zmb3/gogetdoc","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zmb3%2Fgogetdoc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zmb3%2Fgogetdoc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zmb3%2Fgogetdoc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zmb3%2Fgogetdoc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zmb3","download_url":"https://codeload.github.com/zmb3/gogetdoc/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247478323,"owners_count":20945266,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-12T04:50:09.006Z","updated_at":"2025-04-06T12:09:19.950Z","avatar_url":"https://github.com/zmb3.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gogetdoc\n\n[![Build Status](https://travis-ci.org/zmb3/gogetdoc.svg?branch=master)](https://travis-ci.org/zmb3/gogetdoc)\n[![Go Report Card](https://goreportcard.com/badge/github.com/zmb3/gogetdoc)](https://goreportcard.com/report/github.com/zmb3/gogetdoc)\n\nRetrieve documentation for items in Go source code.\n\nGo has a variety of tools that make it easy to lookup documentation.\nThere's the `godoc` HTTP server, the `go doc` command line tool, and https://godoc.org.\n\nThese tools are great, but in many cases one may find it valuable to lookup\ndocumentation right from their editor.  The problem with all of these tools\nis that they are all meant to be used by a person who knows what they are\nlooking for.  This makes editor integration difficult, as there isn't an easy way\nto say \"get me the documentation for this item here.\"\n\nThe `gogetdoc` tool aims to make it easier for editors to provide access to\nGo documentation.  Simply give it a filename and offset within the file and\nit will figure out what you're referring to and find the documentation\nfor it.\n\n## Usage\n\nSimply specify a filename and _byte_ offset with the `pos` flag:\n\n```\n$ gogetdoc -pos \"$(go env GOROOT)/src/fmt/format.go:#2351\"\nimport \"unicode/utf8\"\n\nfunc RuneCountInString(s string) (n int)\n\nRuneCountInString is like RuneCount but its input is a string.\n```\n\nThe `-json` flag can be used to enable the extended JSON output.\nIn this mode, a JSON object will be written to stdout instead of the raw doc.\n\n```javascript\n{\n  \"name\": \"RuneCountInString\",\n  \"import\": \"unicode/utf8\",\n  \"pkg\": \"utf8\",\n  \"decl\": \"func RuneCountInString(s string) (n int)\",\n  \"doc\": \"RuneCountInString is like RuneCount but its input is a string.\\n\",\n  \"pos\": \"/usr/local/Cellar/go/1.9/libexec/src/unicode/utf8/utf8.go:412:6\"\n}\n```\n\n### Unsaved files\n\n`gogetdoc` supports the same archive format as `guru` (formerly `oracle`).\nEditors can supply `gogetdoc` with the contents of unsaved buffers by\nusing the `-modified` flag and writing an archive to stdin.\nFiles in the archive will be preferred over those on disk.\n\nEach archive entry consists of:\n\n- the file name, followed by a newline\n- the (decimal) file size, followed by a newline\n- the contents of the file\n\n## Editor Support\n\nThe following editor plugins are known to support `gogetdoc`:\n\n- Atom: go-plus https://github.com/joefitzgerald/go-plus\n- VS Code: vscode-go https://github.com/Microsoft/vscode-go\n- Vim: vim-go https://github.com/fatih/vim-go\n- Emacs: go-mode https://github.com/dominikh/go-mode.el\n\n## Contributions\n\nAre more than welcome!  For small changes feel free to open a pull request.\nFor larger changes or major features please open an issue to discuss.\n\n## Credits\n\nThe following resources served as both inspiration for starting this tool\nand help coming up with the implementation.\n\n- Alan Donovan's GothamGo talk \"Using `go/types` for Code Comprehension\n  and Refactoring Tools\" https://youtu.be/p_cz7AxVdfg\n- Fatih Arslan's talk at dotGo 2015 \"Tools for working with Go Code\"\n- The `go/types` example repository: https://github.com/golang/example/tree/master/gotypes\n\n## License\n\n`gogetdoc` is licensed under the 3-Clause BSD license - see the LICENSE file for details.\n\nPortions of this code are borrowed from the Go project and are Copyright 2015 The Go Authors.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzmb3%2Fgogetdoc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzmb3%2Fgogetdoc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzmb3%2Fgogetdoc/lists"}