mirror of
https://github.com/eosswedenorg/thalos
synced 2026-06-16 04:24:56 +02:00
internal/server/helpers.go fix a bug in isVariant() where v.Elem() was called on non interface/pointer
This commit is contained in:
parent
634205a546
commit
ea5b2b8fc2
1 changed files with 2 additions and 3 deletions
|
|
@ -112,11 +112,10 @@ func isVariant(v reflect.Value) bool {
|
|||
return false
|
||||
}
|
||||
|
||||
if !isVariantName(v.Index(0).Elem().String()) {
|
||||
return false
|
||||
for v = v.Index(0); v.Kind() == reflect.Interface || v.Kind() == reflect.Pointer; v = v.Elem() {
|
||||
}
|
||||
|
||||
return true
|
||||
return v.Kind() == reflect.String && isVariantName(v.String())
|
||||
}
|
||||
|
||||
func parseTableDeltaData(v any) (map[string]interface{}, error) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue