summaryrefslogtreecommitdiff
path: root/vm/type.go
diff options
context:
space:
mode:
authorMarc Vertes <mvertes@free.fr>2025-12-04 13:28:22 +0100
committerMarc Vertes <mvertes@free.fr>2025-12-04 13:28:22 +0100
commitf07fc0178831432b68f1b9bd6c96b257aa2e9abe (patch)
treedc445dbf1b8946d09be7444b4f141a78e23a568f /vm/type.go
parent90284c5bedc5ab7bb442b34ef470744578dcd266 (diff)
chore: move symbol types and functions in its own package.HEADmain
Diffstat (limited to 'vm/type.go')
-rw-r--r--vm/type.go4
1 files changed, 2 insertions, 2 deletions
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