add OptPanic

This commit is contained in:
gutmet 2018-12-22 20:12:34 +01:00
parent 76fabd44bb
commit 18f9120c8c

View File

@ -104,6 +104,12 @@ func OptDo(err error, f func() error) error {
}
}
func OptPanic(err error) {
if err != nil {
panic(err)
}
}
func IntMin(x, y int) int {
if x < y {
return x