battleship-cli/tools.go

17 lines
201 B
Go

package main
import (
"fmt"
"os"
)
func catchErr(err error) (errHappened bool) {
errHappened = false
if err != nil {
errHappened = true
fmt.Println(err)
os.Exit(2)
}
return errHappened
}