traefik/vendor/github.com/mesosphere/mesos-dns/errorutil/errorutil.go

13 lines
373 B
Go
Raw Normal View History

2017-02-07 21:33:23 +00:00
package errorutil
// ErrorFunction A function definition that returns an error
// to be passed to the Ignore or Panic error handler
type ErrorFunction func() error
// Ignore Calls an ErrorFunction, and ignores the result.
// This allows us to be more explicit when there is no error
// handling to be done, for example in defers
func Ignore(f ErrorFunction) {
_ = f()
}