[DEPRECATED] Creates sourcehut JSON annotations for Go source trees
bugfix: ensure we don't Wait() for subprocess twice
bugfix: eliminate race reading from git ls-tree
Switch to less broken getopt implementation


browse  log 



You can also use your local clone with git send-email.


This program scans Go source code and emits an annotation graph for git.sr.ht's code annotations feature.


annotatego [-Tdv] packages... >annotations.json

The list of packages should be specified per the x/tools/go/packages query format. You must run this command from the root directory of your module for it to work correctly.

This will print annotations to stdout and progress to stderr. For information about uploading these annotations to git.sr.ht, see the git.sr.ht docs.


  • -T: scan tests in addition to normal code
  • -d: disable linking to Godoc for external symbols (enabled by default)
  • -v: enable linking variables to their definitions


To generate annotations for all packages in the git.sr.ht/~sircmpwn/godoc module:

annotatego -v git.sr.ht/~sircmpwn/godoc... > annotations.json

#Bugs, help, patches

Submit bugs to ~sircmpwn/annotate.

Send support requests to sr.ht-discuss.

Send patches via email to sr.ht-dev with git config format.subjectPrefix 'PATCH annotatego'.