Skip to content
This repository has been archived by the owner. It is now read-only.
Go Protocol Buffer
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore add .gitignore Nov 13, 2015
.travis.yml initial commit from template Jul 19, 2014

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.


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.

First-time installation of protobuf and other codegen tools

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
  • protoc-gen-gogo - commit
  • grpc-go - commit
  1. Install protoc, the protobuf compiler. Find more details in the protobuf README.

    Make sure the protoc binary is in your $PATH.

  2. Install gogo/protobuf.

    go get -u
  3. Install grpc:

    go get
  4. Install gen-mocks by running:

    go get -u
  5. Install gopathexec:

    go get -u
  6. Install grpccache-gen:

    go get -u

Regenerating Go code after changing sourcegraph.proto

  1. In go-sourcegraph (this repository), run:

    go generate ./...
You can’t perform that action at this time.