diff --git a/examples/chat/doc.go b/examples/chat/doc.go index 9fff5a7..eccae07 100644 --- a/examples/chat/doc.go +++ b/examples/chat/doc.go @@ -1,6 +1,6 @@ -// Package chat implements a simple chat protocol over HOPP. To re-generate the -// source files, run this command from within the root directory of the -// repository: -// -// go run ./cmd/hopp-generate examples/chat/protocol.pdl -o examples/chat/protocol/protocol.go +// Package chat demonstrates a simple chat protocol. package chat + +// To use this in your own project, replace "go run ../../cmd/hopp-generate" +// with just "hopp-generate". +//go:generate go run ../../cmd/hopp-generate protocol.pdl -o protocol.go diff --git a/examples/ping/doc.go b/examples/ping/doc.go new file mode 100644 index 0000000..e790642 --- /dev/null +++ b/examples/ping/doc.go @@ -0,0 +1,6 @@ +// Example ping demonstrates a simple ping/pong protocol. +package ping + +// To use this in your own project, replace "go run ../../cmd/hopp-generate" +// with just "hopp-generate". +//go:generate go run ../../cmd/hopp-generate protocol.pdl -o protocol.go