MCPcopy
hub / github.com/golang/tools / Add

Method Add

gopls/internal/cache/typerefs/packageset.go:94–97  ·  view source on GitHub ↗

Add records a new element in the package set. It is the caller's responsibility to ensure that idx was created with the same PackageIndex as the PackageSet.

(idx IndexID)

Source from the content-addressed store, hash-verified

92// It is the caller's responsibility to ensure that idx was created with the
93// same PackageIndex as the PackageSet.
94func (s *PackageSet) Add(idx IndexID) {
95 i := int(idx)
96 s.sparse[i/blockSize] |= 1 << (i % blockSize)
97}
98
99// Union records all elements from other into the receiver, mutating the
100// receiver set but not the argument set. The receiver must not be nil, but the

Callers 14

AddPackageMethod · 0.95
AnalyzeMethod · 0.45
decrefPredsMethod · 0.45
addDirsMethod · 0.45
TestFutureCache_RetryingFunction · 0.45
createViewMethod · 0.45
getTransitiveRefsMethod · 0.45
evaluatePackageHandleMethod · 0.45
MetadataForFileMethod · 0.45

Calls 1

intTypeAlias · 0.85

Tested by 4

TestFutureCache_RetryingFunction · 0.36
buildPackageMethod · 0.36