mirror of
https://github.com/LukeHagar/libopenapi.git
synced 2025-12-07 12:37:48 +00:00
Fixed low-level bug that failed to deal with null/empty hashing.
Signed-off-by: Dave Shanley <dave@quobix.com>
This commit is contained in:
@@ -698,6 +698,9 @@ func AreEqual(l, r Hashable) bool {
|
||||
// GenerateHashString will generate a SHA36 hash of any object passed in. If the object is Hashable
|
||||
// then the underlying Hash() method will be called.
|
||||
func GenerateHashString(v any) string {
|
||||
if v == nil {
|
||||
return ""
|
||||
}
|
||||
if h, ok := v.(Hashable); ok {
|
||||
if h != nil {
|
||||
return fmt.Sprintf(HASH, h.Hash())
|
||||
|
||||
Reference in New Issue
Block a user