Improve the speed & reliability of the code.

This commit is contained in:
2024-09-13 21:27:34 +01:00
parent 05b057c67c
commit 7a791965ca
3 changed files with 41 additions and 68 deletions
+2 -2
View File
@@ -9,7 +9,7 @@ import (
libpack_logger "github.com/lukaszraczylo/go-simple-graphql/logging"
)
func searchForKeysInMapStringInterface(msi map[string]interface{}, key string) (value any) {
func searchForKeysInMapStringInterface(msi map[string]interface{}, key string) interface{} {
if msi == nil {
return nil
}
@@ -17,7 +17,7 @@ func searchForKeysInMapStringInterface(msi map[string]interface{}, key string) (
}
func calculateHash(query *Query) string {
hash := md5.Sum([]byte(query.JsonQuery))
hash := md5.Sum(query.JsonQuery)
return hex.EncodeToString(hash[:])
}