Added Opts to ERs

This commit is contained in:
Trial97
2020-09-02 17:07:42 +03:00
committed by Dan Christian Bogos
parent 8f638b5b85
commit 6c10cf0960
29 changed files with 375 additions and 443 deletions

View File

@@ -270,11 +270,11 @@ func BenchmarkGuardian(b *testing.B) {
// BenchmarkGuardIDs-8 1000000 8732 ns/op
func BenchmarkGuardIDs(b *testing.B) {
for n := 0; n < b.N; n++ {
go func() {
if refID := Guardian.GuardIDs("", 0, strconv.Itoa(n)); refID != "" {
go func(i int) {
if refID := Guardian.GuardIDs("", 0, strconv.Itoa(i)); refID != "" {
time.Sleep(time.Microsecond)
Guardian.UnguardIDs(refID)
}
}()
}(n)
}
}