Break core structs down into obj and leak packages

This commit is contained in:
2018-07-08 02:56:51 +01:00
parent 2fdb51166c
commit 6883984950
5 changed files with 21 additions and 16 deletions

24
obj/entry.go Normal file
View File

@@ -0,0 +1,24 @@
package obj
func NewEntry(inputJSON []byte) (*Entry, error) {
obj, err := NewObject(inputJSON)
if err != nil {
return nil, err
}
return &Entry{
Object: obj,
Index: obj.Index(),
}, err
}
// Entry is a parsed heap item object
type Entry struct {
Object *Object
Offset int64
Index string
}
func (s *Entry) Address() string {
return s.Object.Address
}