Add getters to File

This commit is contained in:
Sasha Koshka 2022-08-18 00:50:39 -04:00
parent 568134a7e9
commit cce841f48e

View File

@ -111,3 +111,13 @@ func (file *File) Location (width int) (location Location) {
width: width,
}
}
// Path returns the path that teh file is located at.
func (file *File) Path () (path string) {
return file.path
}
// GetLine returns the line at the specified index.
func (file *File) GetLine (index int) (line string) {
return file.lines[index]
}