From 99ba69a85bcd482b2c7f1a6c8a0f3196b2dbebee Mon Sep 17 00:00:00 2001 From: Razvan Kusztos Date: Mon, 23 Oct 2023 16:28:38 +0100 Subject: [PATCH] rewrite bits of the protoc generated file --- ari.pb.go | 18 ++++++++---------- channel.go | 2 +- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/ari.pb.go b/ari.pb.go index e6718ea..f921181 100644 --- a/ari.pb.go +++ b/ari.pb.go @@ -1,4 +1,10 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. +// Code generated by protoc-gen-go. + +// I had to edit this to avoid refactoring the rest of the library +// too much. Changes are: +// Id fields are replaced with ID +// the String() methods are implemented in other files, so removing from here. + // versions: // protoc-gen-go v1.28.1 // protoc v4.22.2 @@ -50,10 +56,6 @@ func (x *Key) Reset() { } } -func (x *Key) String() string { - return protoimpl.X.MessageStringOf(x) -} - func (*Key) ProtoMessage() {} func (x *Key) ProtoReflect() protoreflect.Message { @@ -129,10 +131,6 @@ func (x *CallerID) Reset() { } } -func (x *CallerID) String() string { - return protoimpl.X.MessageStringOf(x) -} - func (*CallerID) ProtoMessage() {} func (x *CallerID) ProtoReflect() protoreflect.Message { @@ -237,7 +235,7 @@ func (x *ChannelData) GetKey() *Key { func (x *ChannelData) GetId() string { if x != nil { - return x.Id + return x.ID } return "" } diff --git a/channel.go b/channel.go index 8cced2c..17a4364 100644 --- a/channel.go +++ b/channel.go @@ -306,7 +306,7 @@ func NewChannelHandle(key *Key, c Channel, exec func(ch *ChannelHandle) error) * // ID returns the identifier for the channel handle func (ch *ChannelHandle) ID() string { - return ch.key.Id + return ch.key.ID } // Key returns the key for the channel handle