Remove error messages that do not make sense for GUI implementations

This commit is contained in:
2025-02-01 19:31:24 -05:00
parent 4689cae3f4
commit 173574eb85
4 changed files with 6 additions and 18 deletions
+1 -6
View File
@@ -26,7 +26,7 @@ func WalkEntryDir() ([]string, []string) {
// check for errors encountered while walking directory
if err != nil {
if os.IsNotExist(err) {
fmt.Println(joinErrorWithEXE("The entry directory does not exist - Run \"", " init"+"\" to create it"))
fmt.Println(core.AnsiError + "The entry directory does not exist - Initialize libmutton to create it" + core.AnsiReset)
} else {
// otherwise, print the source of the error
fmt.Println(core.AnsiError+"An unexpected error occurred while generating the entry list:", err.Error()+core.AnsiReset)
@@ -49,8 +49,3 @@ func WalkEntryDir() ([]string, []string) {
return fileList, dirList
}
// joinErrorWithEXE is a utility function that joins and returns the two strings it is provided (in error format) with the executable name inserted between them.
func joinErrorWithEXE(firstHalf, secondHalf string) string {
return core.AnsiError + firstHalf + os.Args[0][strings.LastIndex(os.Args[0], "\\")+1:] + secondHalf + core.AnsiReset
}