gRPC migration update
Change-Id: Icdd1a824948fa994cd36bd121c962f5ecf74e3cf
diff --git a/internal/pkg/commands/events.go b/internal/pkg/commands/events.go
index 06f6aee..76d4dbf 100644
--- a/internal/pkg/commands/events.go
+++ b/internal/pkg/commands/events.go
@@ -28,12 +28,11 @@
"github.com/Shopify/sarama"
"github.com/golang/protobuf/jsonpb"
"github.com/golang/protobuf/proto"
- "github.com/golang/protobuf/ptypes"
"github.com/golang/protobuf/ptypes/timestamp"
flags "github.com/jessevdk/go-flags"
"github.com/opencord/voltctl/pkg/filter"
"github.com/opencord/voltctl/pkg/format"
- "github.com/opencord/voltha-protos/v4/go/voltha"
+ "github.com/opencord/voltha-protos/v5/go/voltha"
)
const (
@@ -124,8 +123,7 @@
ts, okay := tsIntf.(*timestamp.Timestamp)
if okay {
// Voltha-Protos 3.2.3 and above
- result, err := ptypes.Timestamp(ts)
- return result, err
+ return ts.AsTime(), nil
}
tsFloat, okay := tsIntf.(float32)
if okay {
@@ -231,8 +229,9 @@
}
if outputAs == "json" {
- marshaler := jsonpb.Marshaler{EmitDefaults: true, AnyResolver: &VolthaAnyResolver{}}
+ marshaler := jsonpb.Marshaler{EmitDefaults: true}
asJson, err := marshaler.MarshalToString(ms)
+
if err != nil {
return fmt.Errorf("Failed to marshal the json: %s", err)
}