mirror of
https://github.com/jimeh/rbheap.git
synced 2026-02-19 04:46:40 +00:00
25 lines
370 B
Go
25 lines
370 B
Go
package main
|
|
|
|
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
|
|
}
|