Signed-off-by: Oliver Davies <oliver@oliverdavies.uk>
This commit is contained in:
Oliver Davies 2025-10-01 12:00:00 +01:00
parent 53a64be850
commit 665ef94ca9
2 changed files with 5 additions and 5 deletions

View file

@ -7,7 +7,7 @@ import (
"code.oliverdavies.uk/opdavies/cmd-zet/internal/lib"
)
func EditFile(filePath string) {
func Edit(filePath string) {
if _, err := os.Stat(filePath); os.IsNotExist(err) {
fmt.Printf("Error: The file for path '%s' was not found\n", filePath)
os.Exit(1)
@ -22,7 +22,7 @@ func EditFile(filePath string) {
}
}
func ViewFile(filePath string) string {
func View(filePath string) string {
if _, err := os.Stat(filePath); os.IsNotExist(err) {
fmt.Printf("Error: The file for path '%s' was not found\n", filePath)
os.Exit(1)