100-go-mistakes/07-error-management/53-not-handling-error/main.go
2021-12-27 15:57:20 +01:00

21 lines
286 B
Go

package main
import "errors"
func listing1() {
// ...
notify()
}
func listing2() {
// ...
// Notifications are sent in best effort.
// Hence, it's accepted to miss some of them in case of errors.
_ = notify()
}
func notify() error {
return errors.New("failed to notify")
}