Skip to content

Commit cddfff5

Browse files
jmhodgesdsymonds
authored andcommitted
goprotobuf: Update README install instructions for go1
R=dsymonds CC=golang-dev, r http://codereview.appspot.com/6858063
1 parent 7e3525a commit cddfff5

File tree

1 file changed

+7
-12
lines changed

1 file changed

+7
-12
lines changed

README

+7-12
Original file line numberDiff line numberDiff line change
@@ -28,28 +28,23 @@ There are no insertion points in the plugin.
2828

2929
To install this code:
3030

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

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

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

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

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

5449
The generated files will be suffixed .pb.go. See the Test code below
5550
for an example using such a file.

0 commit comments

Comments
 (0)