MCPcopy Create free account
hub / github.com/buke/quickjs-go / newHandleStoreWithStartID

Function newHandleStoreWithStartID

handle.go:22–26  ·  view source on GitHub ↗

NewHandleStoreWithStartID creates a new handle store with custom start ID (for testing)

(startID int32)

Source from the content-addressed store, hash-verified

20
21// NewHandleStoreWithStartID creates a new handle store with custom start ID (for testing)
22func newHandleStoreWithStartID(startID int32) *handleStore {
23 hs := &handleStore{}
24 hs.nextID.Store(startID) // start from custom ID, 0 is reserved as invalid
25 return hs
26}
27
28// Store stores a value and returns int32 ID (safe for JS magic parameter)
29func (hs *handleStore) Store(value interface{}) int32 {

Callers 3

newHandleStoreFunction · 0.85

Calls 1

StoreMethod · 0.80

Tested by 2