How to install protobuf in mac

Step one:

brew install protobuf

go get github.com/golang/protobuf/protoc-gen-go

Step two:

export PATH=$PATH:$HOME/go/bin

export PATH=$PATH:/usr/local/go/bin

export PATH=$PATH:$GOPATH/bin

Step three:

protoc --go_out=. *.proto