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