-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdbc_release.go
More file actions
24 lines (18 loc) · 846 Bytes
/
dbc_release.go
File metadata and controls
24 lines (18 loc) · 846 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
//go:build !debug
// +build !debug
package aasx
import "errors"
// ErrPreconditionViolation is returned when a precondition check fails.
var ErrPreconditionViolation = errors.New("precondition violation")
// ErrPostconditionViolation is returned when a postcondition check fails.
var ErrPostconditionViolation = errors.New("postcondition violation")
// Require checks a precondition and panics with the given message if it fails.
// Use this for validating function arguments and entry conditions.
func Require(condition bool, message string) {
// Intentionally left empty in non-debug builds.
}
// Ensure checks a postcondition and panics with the given message if it fails.
// Use this for validating function results and exit conditions.
func Ensure(condition bool, message string) {
// Intentionally left empty in non-debug builds.
}