From cce841f48edbd5eb4ddb9b1a83db0e5ba5f5ca76 Mon Sep 17 00:00:00 2001 From: Sasha Koshka Date: Thu, 18 Aug 2022 00:50:39 -0400 Subject: [PATCH] Add getters to File --- file/file.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/file/file.go b/file/file.go index db6c2d5..50e7478 100644 --- a/file/file.go +++ b/file/file.go @@ -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] +}