Implemented struct size calculation after a scan

This commit is contained in:
Eduard Urbach 2025-02-07 16:26:24 +01:00
parent 8fe663ece1
commit 162ddbefef
Signed by: eduard
GPG key ID: 49226B848C78F6C8
7 changed files with 48 additions and 24 deletions

17
src/types/Base.go Normal file
View file

@ -0,0 +1,17 @@
package types
// Base is used to describe basic types like integers and floats.
type Base struct {
name string
size int
}
// Name returns the name of the type.
func (s *Base) Name() string {
return s.name
}
// Size returns the total size in bytes.
func (s *Base) Size() int {
return s.size
}