0
0
Fork 0

added stringer method to phrase part

a failing test was producing unhelpful pointer addresses as
the only debug output.  this changes the output to print
the terms and locations as readable text

part of #629
This commit is contained in:
Marty Schoch 2017-09-01 09:16:08 -04:00
parent 930c06dfec
commit c048833fcd
1 changed files with 4 additions and 0 deletions

View File

@ -226,6 +226,10 @@ type phrasePart struct {
loc *search.Location
}
func (p *phrasePart) String() string {
return fmt.Sprintf("[%s %v]", p.term, p.loc)
}
type phrasePath []*phrasePart
func (p phrasePath) MergeInto(in search.TermLocationMap) {