Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix some small issues in the README #3

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ Add the dependency to your project.clj
Assuming you have the following in `resources/proto/person.proto`:

```proto
option java_outer_classname = "Example";

message Person {
required int32 id = 1;
required string name = 2;
Expand All @@ -20,7 +22,7 @@ message Person {

Compile the proto using the protobuf compiler and include the resulting .java code in your project

protoc --java_out=./ -proto_dir=resources/proto person.proto
protoc --java_out=java -I=resources/proto resources/proto/person.proto

Now you can use the protocol buffer in Clojure:

Expand All @@ -33,7 +35,7 @@ Now you can use the protocol buffer in Clojure:
(def p (protobuf Person :id 4 :name "Bob" :email "[email protected]"))
=> {:id 4, :name "Bob", :email "[email protected]"}

(assoc p :name "Bill"))
(assoc p :name "Bill")
=> {:id 4, :name "Bill", :email "[email protected]"}

(assoc p :likes ["climbing" "running" "jumping"])
Expand Down