Refactor
Signed-off-by: Oliver Davies <oliver@oliverdavies.uk>
This commit is contained in:
parent
53a64be850
commit
665ef94ca9
2 changed files with 5 additions and 5 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue