summaryrefslogtreecommitdiff
path: root/helpers.go
diff options
context:
space:
mode:
Diffstat (limited to 'helpers.go')
-rw-r--r--helpers.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/helpers.go b/helpers.go
index 49f8cfb..6a8fe69 100644
--- a/helpers.go
+++ b/helpers.go
@@ -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)
+}