Discover Packages
github.com/sourcegraph/go-sourcegraph
module
Version:
v0.0.0-...-cf05d5b
Opens a new window with list of versions in this module.
Published: Nov 20, 2015
License: MIT
Opens a new window with license information.
README
README
¶
go-sourcegraph (deprecated)
Sourcegraph API client library for Go .
Work in progress. If you want to use this, post an issue or contact us @srcgraph .
Development
Protocol buffers
This repository uses the sourcegraph/sourcegraph.proto
protocol buffers definition file to generate Go structs as well as gRPC clients and servers for various service interfaces.
You need to install and run the protobuf compiler before you can regenerate Go code after you change the sourcegraph.proto
file.
If you run into errors while compiling protobufs, try again with these versions that are known to work:
protoc
- version github.com/google/protobuf@v3.0.0-beta-1
.
protoc-gen-gogo
- commit github.com/gogo/protobuf@200875106f3bf0eb01eb297dae30b250a25ffc84
.
grpc-go
- commit google.golang.org/grpc@f7d1653e300d6ad9f019bce7a5f5ab3b4821f637
.
Install protoc , the protobuf compiler. Find more details in the protobuf README .
Make sure the protoc
binary is in your $PATH
.
Install gogo/protobuf .
go get -u github.com/gogo/protobuf/...
Install grpc :
go get google.golang.org/grpc
Install gen-mocks by running:
go get -u sourcegraph.com/sourcegraph/gen-mocks
Install gopathexec
:
go get -u sourcegraph.com/sourcegraph/gopathexec
Install grpccache-gen
:
go get -u sourcegraph.com/sourcegraph/grpccache/grpccache-gen
Regenerating Go code after changing sourcegraph.proto
In go-sourcegraph
(this repository), run:
go generate ./...
Expand ▾
Collapse ▴
Directories
¶
Package routevar contains mux route variable declarations (e.g., `{Repo:<regexp>}`) and PostMatchFuncs/BuildVarsFuncs.
Package routevar contains mux route variable declarations (e.g., `{Repo:<regexp>}`) and PostMatchFuncs/BuildVarsFuncs.
Package sourcegraph is a generated protocol buffer package.
Package sourcegraph is a generated protocol buffer package.
Package spec contains regexps, parse functions, and stringification functions for user, repo, repo rev, etc., specifiers.
Package spec contains regexps, parse functions, and stringification functions for user, repo, repo rev, etc., specifiers.
Click to show internal directories.
Click to hide internal directories.