aboutsummaryrefslogtreecommitdiff
path: root/assert.go
blob: c22b2b048b09d14d397e5f836ce40da4a2e5bf52 (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...))
	}
}