- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for loadOrStoreVisitMap (0.07 sec)
-
callbacks/helper_test.go
t3 := testM{Name: "t3"} vm = make(visitMap) if loaded = loadOrStoreVisitMap(&vm, reflect.ValueOf(&t1)); loaded { t.Fatalf("loaded should be false") } if loaded = loadOrStoreVisitMap(&vm, reflect.ValueOf(&t1)); !loaded { t.Fatalf("loaded should be true") } // t1 already exist but t2 not if loaded = loadOrStoreVisitMap(&vm, reflect.ValueOf([]*testM{&t1, &t2, &t3})); loaded {
Registered: Sun Sep 07 09:35:13 UTC 2025 - Last Modified: Tue Mar 05 02:22:57 UTC 2024 - 3.4K bytes - Viewed (0) -
callbacks/associations.go
func checkAssociationsSaved(db *gorm.DB, values reflect.Value) bool { if visit, ok := db.Get(visitMapStoreKey); ok { if v, ok := visit.(*visitMap); ok { if loadOrStoreVisitMap(v, values) { return true } } } else { vistMap := make(visitMap) loadOrStoreVisitMap(&vistMap, values) db.Set(visitMapStoreKey, &vistMap) } return false
Registered: Sun Sep 07 09:35:13 UTC 2025 - Last Modified: Thu Feb 13 06:16:26 UTC 2025 - 14.4K bytes - Viewed (0)