From f07fc0178831432b68f1b9bd6c96b257aa2e9abe Mon Sep 17 00:00:00 2001 From: Marc Vertes Date: Thu, 4 Dec 2025 13:28:22 +0100 Subject: chore: move symbol types and functions in its own package. --- vm/type.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'vm/type.go') diff --git a/vm/type.go b/vm/type.go index 782aa28..644c106 100644 --- a/vm/type.go +++ b/vm/type.go @@ -95,8 +95,8 @@ func StructOf(fields []*Type) *Type { return &Type{Rtype: reflect.StructOf(rf)} } -// FieldNameIndex returns the index of struct field name. -func (t *Type) FieldNameIndex(name string) []int { +// FieldIndex returns the index of struct field name. +func (t *Type) FieldIndex(name string) []int { for _, f := range reflect.VisibleFields(t.Rtype) { if f.Name == name { return f.Index -- cgit v1.2.3