mirror of
https://github.com/LukeHagar/libopenapi.git
synced 2025-12-06 20:47:49 +00:00
bumping test coverage, adding more tests.
Signed-off-by: Dave Shanley <dave@quobix.com>
This commit is contained in:
@@ -6,6 +6,7 @@ package low
|
||||
import (
|
||||
"crypto/sha256"
|
||||
"fmt"
|
||||
"reflect"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
@@ -685,5 +686,9 @@ func GenerateHashString(v any) string {
|
||||
return fmt.Sprintf(HASH, h.Hash())
|
||||
}
|
||||
}
|
||||
// if we get here, we're a primitive, check if we're a pointer and de-point
|
||||
if reflect.TypeOf(v).Kind() == reflect.Ptr {
|
||||
v = reflect.ValueOf(v).Elem().Interface()
|
||||
}
|
||||
return fmt.Sprintf(HASH, sha256.Sum256([]byte(fmt.Sprint(v))))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user