diff --git a/repository/link.go b/repository/link.go index a99e5e4..0d4953b 100644 --- a/repository/link.go +++ b/repository/link.go @@ -126,6 +126,9 @@ type LinkPosition struct { offset int64 } +func NewLinkPosition(link *Link, offset int64) *LinkPosition { + return &LinkPosition{link: link, offset: offset} +} func (l *LinkPosition) Link() *Link { return l.link } @@ -157,6 +160,9 @@ func (l *LinkPort) Device() PortedDevice { func (l *LinkPort) IsPortA() bool { return l.port == proto.Port_A } +func (l *LinkPort) Link() *Link { + return l.link +} type LinkRange struct { link *Link