aboutsummaryrefslogtreecommitdiff
path: root/assert.go
blob: 8101f8a190b734fe7c911e35f236ebee8005b109 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
package bolt

import "fmt"

// TODO(benbjohnson): Remove assertions before release.

// _assert will panic with a given formatted message if the given condition is false.
func _assert(condition bool, msg string, v ...interface{}) {
	if !condition {
		panic(fmt.Sprintf("assertion failed: " + msg, v...))
	}
}