Return -1 when input file not available
This commit is contained in:
parent
4b06c3064b
commit
85c1aff8ab
2
main.go
2
main.go
@ -91,7 +91,7 @@ func main() {
|
|||||||
f, err = os.Open(filename)
|
f, err = os.Open(filename)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Printf("Impossible d'ouvrir le fichier %s\n", filename)
|
fmt.Printf("Impossible d'ouvrir le fichier %s\n", filename)
|
||||||
return
|
os.Exit(-1)
|
||||||
}
|
}
|
||||||
r = bufio.NewReader(f)
|
r = bufio.NewReader(f)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user