NewInfoSource creates a new Source from a SourceInfo.
(info *exprpb.SourceInfo)
| 110 | |
| 111 | // NewInfoSource creates a new Source from a SourceInfo. |
| 112 | func NewInfoSource(info *exprpb.SourceInfo) Source { |
| 113 | return &sourceImpl{ |
| 114 | Buffer: runes.NewBuffer(""), |
| 115 | description: info.GetLocation(), |
| 116 | lineOffsets: info.GetLineOffsets(), |
| 117 | } |
| 118 | } |
| 119 | |
| 120 | // Content implements the Source interface method. |
| 121 | func (s *sourceImpl) Content() string { |