Finish the D&D module cleanup
This commit is contained in:
@@ -31,6 +31,14 @@ func NewDocumentIndex(doc *SourceDocument) DocumentIndex {
|
||||
}
|
||||
}
|
||||
|
||||
// DocumentID returns the indexed document identity.
|
||||
func (i DocumentIndex) DocumentID() (string, bool) {
|
||||
if !i.hasDocument {
|
||||
return "", false
|
||||
}
|
||||
return i.documentID, true
|
||||
}
|
||||
|
||||
// Position returns the indexed document position for unitID.
|
||||
func (i DocumentIndex) Position(unitID int) (int, bool) {
|
||||
position, ok := i.positions[unitID]
|
||||
|
||||
Reference in New Issue
Block a user