FAQ
Reviewers: dsymonds,

Message:
Hello dsymonds@golang.org (cc: golang-dev@googlegroups.com,
r@golang.org),

I'd like you to review this change to
https://code.google.com/p/goprotobuf


Description:
goprotobuf: Update README install instructions for go1

Please review this at http://codereview.appspot.com/6858063/

Affected files:
M README


Index: README
===================================================================
--- a/README
+++ b/README
@@ -28,27 +28,25 @@

To install this code:

-The simplest way is to run goinstall.
+The simplest way is to run go get.

# Grab the code from the repository and install the proto package.
- goinstall code.google.com/p/goprotobuf/proto
-
- # Compile and install the compiler plugin
- cd $GOROOT/src/pkg/code.google.com/p/goprotobuf/compiler
- make install
+ go get -u code.google.com/p/goprotobuf/{proto, protoc-gen-go}

The compiler plugin, protoc-gen-go, will be installed in $GOBIN,
-defaulting to $HOME/bin. It must be in your $PATH for the protocol
+defaulting to $GOPATH/bin. It must be in your $PATH for the protocol
compiler, protoc, to find it.

Once the software is installed, there are two steps to using it.
First you must compile the protocol buffer definitions and then import
them, with the support library, into your program.

-To compile the protocol buffer definition, write a Makefile in the
-style shown in the comment in the file Make.protobuf. If your Makefile
-includes Make.protobuf, the rest should follow automatically. The
-generated code can be compiled separately or as part of a normal Go
+To compile the protocol buffer definition, run protoc with the --go_out
+parameter set to the directory you want to output the Go code to.
+
+ protoc --go_out=. *.proto
+
+The generated code can be compiled separately or as part of a normal Go
package.

The generated files will be suffixed .pb.go. See the Test code below

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupgolang-dev @
categoriesgo
postedNov 24, '12 at 4:31a
activeNov 26, '12 at 2:58a
posts8
users2
websitegolang.org

2 users in discussion

Dsymonds: 4 posts Jeff: 4 posts

People

Translate

site design / logo © 2022 Grokbase