VOL-3934 - TLS connection support
This is a bit of a breaking change as the current voltctl config
file defines verify as a string when it should have been a bool
from the start.
depends on merge of https://gerrit.opencord.org/c/voltha-lib-go/+/23594
Change-Id: Idb1f90a6bc827a599f2290bd276604997aab44e8
diff --git a/vendor/github.com/opencord/voltha-lib-go/v4/pkg/db/kvstore/kvutils.go b/vendor/github.com/opencord/voltha-lib-go/v4/pkg/db/kvstore/kvutils.go
index 64e7d30..70bd977 100644
--- a/vendor/github.com/opencord/voltha-lib-go/v4/pkg/db/kvstore/kvutils.go
+++ b/vendor/github.com/opencord/voltha-lib-go/v4/pkg/db/kvstore/kvutils.go
@@ -15,7 +15,10 @@
*/
package kvstore
-import "fmt"
+import (
+ "bytes"
+ "fmt"
+)
// ToString converts an interface value to a string. The interface should either be of
// a string type or []byte. Otherwise, an error is returned.
@@ -42,3 +45,14 @@
return nil, fmt.Errorf("unexpected-type-%T", t)
}
}
+
+// Helper function to verify mostly whether the content of two interface types are the same. Focus is []byte and
+// string types
+func isEqual(val1 interface{}, val2 interface{}) bool {
+ b1, err := ToByte(val1)
+ b2, er := ToByte(val2)
+ if err == nil && er == nil {
+ return bytes.Equal(b1, b2)
+ }
+ return val1 == val2
+}