gotags

ctags-compatible tag generator for Go

  • Owner: jstemmer/gotags
  • Platform:
  • License:: MIT License
  • Category::
  • Topic:
  • Like:
    0
      Compare:

Github stars Tracking Chart

gotags

gotags is a ctags-compatible tag generator for Go.

Build Status
Report Card

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

vim Tagbar gotags

gotags with Emacs

Gotags doesn't have support for generating etags yet, but
gotags-el allows you to use
gotags directly in Emacs.

Main metrics

Overview
Name With Ownerjstemmer/gotags
Primary LanguageGo
Program languageGo (Language Count: 1)
Platform
License:MIT License
所有者活动
Created At2012-03-30 21:32:18
Pushed At2021-04-08 09:12:32
Last Commit At2018-02-02 16:35:08
Release Count6
Last Release Namev1.4.1 (Posted on 2017-04-03 21:37:10)
First Release Namev1.0.0 (Posted on 2012-03-30 23:31:23)
用户参与
Stargazers Count854
Watchers Count21
Fork Count72
Commits Count121
Has Issues Enabled
Issues Count27
Issue Open Count6
Pull Requests Count11
Pull Requests Open Count5
Pull Requests Close Count5
项目设置
Has Wiki Enabled
Is Archived
Is Fork
Is Locked
Is Mirror
Is Private