mirror of
https://github.com/eosswedenorg/thalos
synced 2026-07-03 11:53:41 +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
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
if !isVariantName(v.Index(0).Elem().String()) {
|
for v = v.Index(0); v.Kind() == reflect.Interface || v.Kind() == reflect.Pointer; v = v.Elem() {
|
||||||
return false
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return true
|
return v.Kind() == reflect.String && isVariantName(v.String())
|
||||||
}
|
}
|
||||||
|
|
||||||
func parseTableDeltaData(v any) (map[string]interface{}, error) {
|
func parseTableDeltaData(v any) (map[string]interface{}, error) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue