Compare commits

...

1 Commits

Author SHA1 Message Date
f343f7b53d Discover go install 2024-10-03 10:54:21 +02:00
3 changed files with 12 additions and 3 deletions

2
.gitignore vendored
View File

@@ -1 +1 @@
main.exe
*.exe

2
go.mod
View File

@@ -1,3 +1,3 @@
module main
module fmoditer
go 1.22.4

View File

@@ -91,9 +91,18 @@ func main() {
}
func DoesFileExist(input string) bool {
if input == "" {
return false
}
file, err := os.Open(input)
if err != nil {
if os.IsNotExist(err) {
return false
} else {
log.Printf("Error checking if file exists: %s", err)
file.Close()
return true
}
}
file.Close()
return true