Last active
January 12, 2019 12:13
-
-
Save ivanzoid/07c25fb65e0df48f6a7f36d194347add to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import "os" | |
func fileExists(reqFilePath string) bool { | |
_, err := os.Stat(reqFilePath) | |
exists := false | |
if err == nil { | |
exists = true | |
} else { | |
exists = !os.IsNotExist(err) | |
} | |
return exists | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment