Protocol Buffers Docs

From Wikipedia: Protocol Buffers is a method of serializing structured data. It is useful in developing programs to communicate with each other over a wire or for storing data. The method involves an interface description language that describes the structure of some data and a program that generates source code from that description for generating or parsing a stream of bytes that represents the structured data.

Generating Your Classes

This documents how to generate the language specific code / packages from the .proto files.

The proto2 Language Guide does not include syntax fro Go. The proto3 Language Guide does include Go, and the "protoc" syntax doesn't appear to have changed. This syntax DOES work with Go, so here's the documentation for proto3:

protoc --proto_path=IMPORT_PATH --cpp_out=DST_DIR --java_out=DST_DIR --python_out=DST_DIR --go_out=DST_DIR --ruby_out=DST_DIR --javanano_out=DST_DIR path/to/file.proto

IMPORT_PATH specifies a directory in which to look for .proto files when resolving import directives. If omitted, the current directory is used. Multiple import directories can be specified by passing the --proto_path option multiple times; they will be searched in order. -I=IMPORT_PATH can be used as a short form of --proto_path.

  • You can provide one or more output directives:
    • --cpp_out generates C++ code in DST_DIR. See the C++ generated code reference for more.
    • --java_out generates Java code in DST_DIR. See the Java generated code reference for more.
    • --python_out generates Python code in DST_DIR. See the Python generated code reference for more.
    • --go_out generates Go code in DST_DIR. Go generated code reference is coming soon!
    • --ruby_out generates Ruby code in DST_DIR. Ruby generated code reference is coming soon!
    • --javanano_out generates JavaNano code in DST_DIR. The JavaNano code generator has a number of options you can use to customize the generator output: you can find out more about these in the generator README. JavaNano generated code reference is coming soon!

As an extra convenience, if the DST_DIR ends in .zip or .jar, the compiler will write the output to a single ZIP-format archive file with the given name. .jar outputs will also be given a manifest file as required by the Java JAR specification. Note that if the output archive already exists, it will be overwritten; the compiler is not smart enough to add files to an existing archive. * You must provide one or more .proto files as input. Multiple .proto files can be specified at once. Although the files are named relative to the current directory, each file must reside in one of the IMPORT_PATHs so that the compiler can determine its canonical name.

Database - Relational


The database/sql and database/sql/driver packages are designed for using databases from Go and implementing database drivers, respectively. See the design goals doc:


This library implements a cron spec parser and runner. Uses a standard cron type syntax for job scheduling.

import "

From the documentation:


Package logging implements a logging infrastructure for Go. It supports different logging backends like syslog, file and memory. Multiple backends can be utilized with different log levels per backend and logger.

import ""


Official Go Documentation

Go Experts and Resources

The following are some of the people and resources I have found to be valuable for learning Go:

  •  Start 
  •  Prev 
  •  1  2 
  •  Next 
  •  End 
Page 1 of 2
Go to top