- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for NewMatch (0.28 sec)
-
src/cmd/go/internal/modload/search.go
// against the standard library (std and cmd) in GOROOT/src. func MatchInModule(ctx context.Context, pattern string, m module.Version, tags map[string]bool) *search.Match { match := search.NewMatch(pattern) if m == (module.Version{}) { matchPackages(ctx, match, tags, includeStd, nil) } LoadModFile(ctx) // Sets Target, needed by fetch and matchPackages. if !match.IsLiteral() {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Nov 08 17:55:15 UTC 2023 - 7.9K bytes - Viewed (0) -
internal/store/batch.go
func (b *Batch[K, T]) IsFull() bool { b.Lock() defer b.Unlock() return b.isFull() } func (b *Batch[K, T]) isFull() bool { return len(b.items) >= int(b.limit) } // NewBatch creates a new batch func NewBatch[K key, T any](limit uint32) *Batch[K, T] { return &Batch[K, T]{ keys: make([]K, 0, limit), items: make(map[K]T, limit), limit: limit, }
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Sat Oct 07 15:07:38 UTC 2023 - 2.5K bytes - Viewed (0) -
internal/store/batch_test.go
// along with this program. If not, see <http://www.gnu.org/licenses/>. package store import ( "errors" "sync" "testing" ) func TestBatch(t *testing.T) { var limit uint32 = 100 batch := NewBatch[int, int](limit) for i := 0; i < int(limit); i++ { if err := batch.Add(i, i); err != nil { t.Fatalf("failed to add %v; %v", i, err) } if _, ok := batch.GetByKey(i); !ok {
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Sat Oct 07 15:07:38 UTC 2023 - 3.8K bytes - Viewed (0)