Skip to content

Commit

Permalink
Make example plugin work for all topics in dev/gen
Browse files Browse the repository at this point in the history
  • Loading branch information
cswank committed Jan 22, 2019
1 parent 2aef792 commit c9d0944
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions examples/plugin/protobuf.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ import (
type Protobuf struct{}

func (p Protobuf) Decode(topic string, b []byte) ([]byte, error) {
if topic != "proto" {
return b, nil
}

var x person.Person
err := proto.Unmarshal(b, &x)
if err != nil {
Expand Down

0 comments on commit c9d0944

Please sign in to comment.