Documentation
¶
Overview ¶
Package source provides facilities to represent text documents as a sequence of lines.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func StringLines ¶
StringLines returns the supplied lines as a sequence of strings.
Types ¶
type Line ¶
type Line struct {
// Bytes returns the line byte inc. any trailing end-of-line markers
Bytes []byte
// Range returns range of the line bytes inc. any trailing end-of-line markers
// The range will span across two lines in most cases
// (other than last line without trailing new line)
Range hcl.Range
}
Line represents a line of source code. Each line is associated with an HCL range that includes the filename, start and end positions.
func MakeSourceLines ¶
MakeSourceLines returns the lines in the supplied text. The returned lines will have one more extra line than the source for insertion use.
Click to show internal directories.
Click to hide internal directories.