diff options
Diffstat (limited to 'helpers.go')
| -rw-r--r-- | helpers.go | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -6,6 +6,7 @@ package virtbuf import ( "google.golang.org/protobuf/encoding/protojson" "google.golang.org/protobuf/encoding/prototext" + "google.golang.org/protobuf/proto" ) // human readable JSON @@ -77,3 +78,7 @@ func (d *Droplet) UnmarshalJSON(data []byte) error { func (e *Events) UnmarshalJSON(data []byte) error { return protojson.Unmarshal(data, e) } + +func (d *Droplet) Unmarshal(data []byte) error { + return proto.Unmarshal(data, d) +} |
