Implemented reading from struct fields

This commit is contained in:
2025-02-04 20:43:15 +01:00
parent 03a3bd8f02
commit bde68d4d64
10 changed files with 112 additions and 15 deletions

View File

@ -14,3 +14,13 @@ func (s *Struct) UniqueName() string {
func (s *Struct) TotalSize() uint8 {
return s.Size
}
func (s *Struct) FieldByName(name string) *Field {
for _, field := range s.Fields {
if field.Name == name {
return field
}
}
return nil
}