github.com/itsabgr/go-handy@v0.0.0-20220724000257-022d51f2b9c6/throw.go (about) 1 package handy 2 3 //Throw panics if any of values is not nil 4 func Throw(values ...interface{}) { 5 for _, error := range values { 6 if error != nil { 7 panic(error) 8 } 9 } 10 }