Change-Id: Ieab593790872107f78483ffbe29f507e158b8825
This commit is contained in:
qiulaidongfeng 2024-09-24 21:16:14 +08:00
parent 6dccae260b
commit 84eeab94dd
No known key found for this signature in database
GPG Key ID: 2C6D0C0AA6632FF6
1 changed files with 1 additions and 0 deletions

View File

@ -314,6 +314,7 @@ func WriteComparable[T comparable](h *Hash, x T) {
// when the value cannot be directly hash raw memory,
// or when purego is used.
func appendT(h *Hash, v reflect.Value) {
h.WriteString(v.Type().String())
switch v.Kind() {
case reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, reflect.Int:
var buf [8]byte