https://github.com/jstemmer/gotags
ctags-compatible tag generator for Go
https://github.com/jstemmer/gotags
ctags go golang gotags
Last synced: 5 months ago
JSON representation
ctags-compatible tag generator for Go
- Host: GitHub
- URL: https://github.com/jstemmer/gotags
- Owner: jstemmer
- License: mit
- Created: 2012-03-30T21:32:18.000Z (about 13 years ago)
- Default Branch: master
- Last Pushed: 2021-04-08T09:12:32.000Z (about 4 years ago)
- Last Synced: 2024-11-08T15:05:06.872Z (6 months ago)
- Topics: ctags, go, golang, gotags
- Language: Go
- Homepage:
- Size: 80.1 KB
- Stars: 852
- Watchers: 22
- Forks: 74
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-golang-repositories - gotags - compatible tag generator for Go (Repositories)
README
# gotags
gotags is a [ctags][]-compatible tag generator for [Go][].
[![Build Status][travis-badge]][travis-link]
[![Report Card][report-badge]][report-link]## Installation
[Go][] version 1.1 or higher is required. Install or update gotags using the
`go get` command:go get -u github.com/jstemmer/gotags
Or using package manager `brew` on OS X
brew install gotags
## Usage
gotags [options] file(s)
-L="": source file names are read from the specified file. If file is "-", input is read from standard in.
-R=false: recurse into directories in the file list.
-f="": write output to specified file. If file is "-", output is written to standard out.
-silent=false: do not produce any output on error.
-sort=true: sort tags.
-tag-relative=false: file paths should be relative to the directory containing the tag file.
-v=false: print version.## Vim [Tagbar][] configuration
Put the following configuration in your vimrc:
let g:tagbar_type_go = {
\ 'ctagstype' : 'go',
\ 'kinds' : [
\ 'p:package',
\ 'i:imports:1',
\ 'c:constants',
\ 'v:variables',
\ 't:types',
\ 'n:interfaces',
\ 'w:fields',
\ 'e:embedded',
\ 'm:methods',
\ 'r:constructor',
\ 'f:functions'
\ ],
\ 'sro' : '.',
\ 'kind2scope' : {
\ 't' : 'ctype',
\ 'n' : 'ntype'
\ },
\ 'scope2kind' : {
\ 'ctype' : 't',
\ 'ntype' : 'n'
\ },
\ 'ctagsbin' : 'gotags',
\ 'ctagsargs' : '-sort -silent'
\ }### Vim+Tagbar Screenshot
## gotags with Emacs
Gotags doesn't have support for generating etags yet, but
[gotags-el](https://github.com/craig-ludington/gotags-el) allows you to use
gotags directly in Emacs.[ctags]: http://ctags.sourceforge.net
[go]: https://golang.org
[tagbar]: https://majutsushi.github.com/tagbar/
[screenshot]: https://github.com/jstemmer/gotags/gotags-1.0.0-screenshot.png
[travis-badge]: https://travis-ci.org/jstemmer/gotags.svg?branch=master
[travis-link]: https://travis-ci.org/jstemmer/gotags
[report-badge]: https://goreportcard.com/badge/github.com/jstemmer/gotags
[report-link]: https://goreportcard.com/report/github.com/jstemmer/gotags