File: errors_after_13.go

package info (click to toggle)
golang-github-thejerf-suture 4.0.1-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid
  • size: 260 kB
  • sloc: sh: 24; makefile: 2
file content (20 lines) | stat: -rw-r--r-- 706 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// +build go1.13

package suture

import "errors"

func isErr(err error, target error) bool {
	return errors.Is(err, target)
}

// ErrDoNotRestart can be returned by a service to voluntarily not
// be restarted. Any error that will compare with errors.Is as being this
// error will count as an ErrDoNotRestart.
var ErrDoNotRestart = errors.New("service should not be restarted")

// ErrTerminateSupervisorTree can can be returned by a service to terminate the
// entire supervision tree above it as well. Any error that will compare
// with errors.Is to be ErrTerminateSupervisorTree will count as an
// ErrTerminateSupervisorTree.
var ErrTerminateSupervisorTree = errors.New("tree should be terminated")