replace proto.Clone calls (#3024)

* replace proto.Clone calls

* deps

* tests
This commit is contained in:
Paul Wells
2024-09-18 22:47:33 -07:00
committed by GitHub
parent 978db00034
commit 4deaac2f3f
21 changed files with 62 additions and 62 deletions
@@ -20,6 +20,7 @@ import (
"github.com/livekit/livekit-server/pkg/utils"
"github.com/livekit/protocol/livekit"
"github.com/livekit/protocol/logger"
protoutils "github.com/livekit/protocol/utils"
)
type ConfigurationItem struct {
@@ -58,7 +59,7 @@ func (s *StaticClientConfigurationManager) GetConfiguration(clientInfo *livekit.
var conf *livekit.ClientConfiguration
for k, v := range matchedConf {
if k == 0 {
conf = proto.Clone(matchedConf[0]).(*livekit.ClientConfiguration)
conf = protoutils.CloneProto(matchedConf[0])
} else {
// TODO : there is a problem use protobuf merge, we don't have flag to indicate 'no value',
// don't override default behavior or other configuration's field. So a bool value = false or