[VOL-5567] Upgrade protos and remove deprecated dependencies
Change-Id: I699f46a8f3f6140431d7e813b6ae48f3db55f45c
Signed-off-by: bseeniva <balaji.seenivasan@radisys.com>
diff --git a/vendor/go.uber.org/mock/gomock/string.go b/vendor/go.uber.org/mock/gomock/string.go
new file mode 100644
index 0000000..ec4ca7e
--- /dev/null
+++ b/vendor/go.uber.org/mock/gomock/string.go
@@ -0,0 +1,36 @@
+package gomock
+
+import (
+ "fmt"
+ "reflect"
+)
+
+// getString is a safe way to convert a value to a string for printing results
+// If the value is a a mock, getString avoids calling the mocked String() method,
+// which avoids potential deadlocks
+func getString(x any) string {
+ if isGeneratedMock(x) {
+ return fmt.Sprintf("%T", x)
+ }
+ if s, ok := x.(fmt.Stringer); ok {
+ return s.String()
+ }
+ return fmt.Sprintf("%v", x)
+}
+
+// isGeneratedMock checks if the given type has a "isgomock" field,
+// indicating it is a generated mock.
+func isGeneratedMock(x any) bool {
+ typ := reflect.TypeOf(x)
+ if typ == nil {
+ return false
+ }
+ if typ.Kind() == reflect.Ptr {
+ typ = typ.Elem()
+ }
+ if typ.Kind() != reflect.Struct {
+ return false
+ }
+ _, isgomock := typ.FieldByName("isgomock")
+ return isgomock
+}