Documentation
¶
Index ¶
- func AssertLocationsResult(t *testing.T, actual []protocol.Location, expected []ExpectedLocationsResult)
- func GetPositionOfMarkedLineInFile(fileContent, markedLine, marker string) (pos protocol.Position, found bool)
- func GetRangeOfMarkedLineInFile(fileContent, markedLine, marker string) (pos protocol.Range, found bool)
- func RangeMarkedLineToPositionMarkedLines(markedLine string, marker string) (string, string)
- type ExpectedLocationsResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AssertLocationsResult ¶
func AssertLocationsResult(t *testing.T, actual []protocol.Location, expected []ExpectedLocationsResult)
func GetPositionOfMarkedLineInFile ¶
func GetPositionOfMarkedLineInFile(fileContent, markedLine, marker string) (pos protocol.Position, found bool)
Finds the first occurrence of the marked line (or a substring) in the file and returns its position.
Types ¶
type ExpectedLocationsResult ¶
type ExpectedLocationsResult struct {
Filepath string
// the expected line with the range marked using §§
MarkedLine string
}
func (ExpectedLocationsResult) GetLocation ¶
func (expected ExpectedLocationsResult) GetLocation() (protocol.Location, error)
Click to show internal directories.
Click to hide internal directories.