forked from goodbadreviewer/immcheck
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathimmcheck_norace.go
More file actions
31 lines (24 loc) · 1.08 KB
/
immcheck_norace.go
File metadata and controls
31 lines (24 loc) · 1.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
//go:build !race && !immcheck
// +build !race,!immcheck
package immcheck
// ImmcheckRaceEnabled can be used in test to verify if mutability should be detected or not.
const ImmcheckRaceEnabled = false
func noop() {}
// RaceEnsureImmutability same as immcheck.EnsureImmutability
// but works only under `race` or `immcheck` build flags.
func RaceEnsureImmutability(v interface{}) func() {
return noop
}
// RaceEnsureImmutabilityWithOptions same as immcheck.EnsureImmutabilityWithOptions
// but works only under `race` or `immcheck` build flags.
func RaceEnsureImmutabilityWithOptions(v interface{}, options Options) func() {
return noop
}
// RaceCheckImmutabilityOnFinalization same as immcheck.CheckImmutabilityOnFinalization
// but works only under `race` or `immcheck` build flags.
func RaceCheckImmutabilityOnFinalization(v interface{}) {
}
// RaceCheckImmutabilityOnFinalizationWithOptions same as immcheck.CheckImmutabilityOnFinalizationWithOptions
// but works only under `race` or `immcheck` build flags.
func RaceCheckImmutabilityOnFinalizationWithOptions(v interface{}, options Options) {
}