From aa1b41bb343fcdc580d7c4d1aad49dfffd5b893b Mon Sep 17 00:00:00 2001 From: Jose Acevedo Date: Mon, 18 Nov 2024 10:54:29 -0500 Subject: [PATCH] Fix build --- go/internal/feast/utils/key_utils.go | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 go/internal/feast/utils/key_utils.go diff --git a/go/internal/feast/utils/key_utils.go b/go/internal/feast/utils/key_utils.go new file mode 100644 index 0000000000..a3e20580f7 --- /dev/null +++ b/go/internal/feast/utils/key_utils.go @@ -0,0 +1,15 @@ +package utils + +import ( + "crypto/sha1" + "encoding/hex" +) + +func HashSerializedEntityKey(serializedEntityKey *[]byte) string { + if serializedEntityKey == nil { + return "" + } + h := sha1.New() + h.Write(*serializedEntityKey) + return hex.EncodeToString(h.Sum(nil)) +}