error messages improved
This commit is contained in:
parent
2a4380b1c0
commit
b59d2a8001
3
main.go
3
main.go
@ -22,7 +22,8 @@ func main() {
|
|||||||
|
|
||||||
envFile, err := os.Open(*EnvFilePath)
|
envFile, err := os.Open(*EnvFilePath)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err)
|
fmt.Fprintf(os.Stderr, "could not open file '%s': %s\n", *EnvFilePath, err.(*os.PathError).Err)
|
||||||
|
return
|
||||||
}
|
}
|
||||||
defer envFile.Close()
|
defer envFile.Close()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user