To index Go we use SourceGraph's LSIF indexer for Go. LSIF is a new format for tools to share information about code. Binary releases of lsif-go are available ffor x86 Linux which will work as Glean indexers. The LSIF indexer uses a recent (>1.15) version of Go.
Run the indexer
The indexer is run via the main
glean CLI tool.
> cabal build exe:glean
And index your Go repository with:
glean index go DIR --repo name/hash
DIRis the root directory containing the Go project
name/hashis the name of the repository to create
Provide the usual
In the shell
Go source can also be indexed directly from the Glean shell:
:index go DIR
The shell will pick a DB name and hash for you based on
The schema is in glean/schema/source/lsif.angle