- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 141 for Map (0.02 sec)
-
src/go/types/map.go
// Source: ../../cmd/compile/internal/types2/map.go // Copyright 2011 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package types // A Map represents a map type. type Map struct { key, elem Type } // NewMap returns a new map for the given key and element types. func NewMap(key, elem Type) *Map { return &Map{key: key, elem: elem} }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Apr 03 18:48:38 UTC 2024 - 781 bytes - Viewed (0) -
src/internal/abi/map.go
// Copyright 2023 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package abi // Map constants common to several packages // runtime/runtime-gdb.py:MapTypePrinter contains its own copy const ( // Maximum number of key/elem pairs a bucket can hold. MapBucketCountBits = 3 // log2 of number of elements in a bucket. MapBucketCount = 1 << MapBucketCountBits
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Apr 22 20:09:01 UTC 2024 - 719 bytes - Viewed (0) -
src/expvar/expvar.go
v.f.Store(math.Float64bits(value)) } // Map is a string-to-Var map variable that satisfies the [Var] interface. type Map struct { m sync.Map // map[string]Var keysMu sync.RWMutex keys []string // sorted } // KeyValue represents a single entry in a [Map]. type KeyValue struct { Key string Value Var } func (v *Map) String() string { return string(v.appendJSON(nil)) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Apr 26 21:32:11 UTC 2024 - 9.1K bytes - Viewed (0) -
src/maps/iter.go
// to be the same from one call to the next. func Values[Map ~map[K]V, K comparable, V any](m Map) iter.Seq[V] { return func(yield func(V) bool) { for _, v := range m { if !yield(v) { return } } } } // Insert adds the key-value pairs from seq to m. // If a key in seq already exists in m, its value will be overwritten. func Insert[Map ~map[K]V, K comparable, V any](m Map, seq iter.Seq2[K, V]) { for k, v := range seq {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 22 13:41:45 UTC 2024 - 1.6K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/tools/internal/facts/imports.go
) // importMap computes the import map for a package by traversing the // entire exported API each of its imports. // // This is a workaround for the fact that we cannot access the map used // internally by the types.Importer returned by go/importer. The entries // in this map are the packages and objects that may be relevant to the // current analysis unit. // // Packages in the map that are only indirectly imported may be
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Apr 02 02:20:05 UTC 2024 - 3.5K bytes - Viewed (0) -
src/unique/handle.go
toInsertWeak = weak.Make(toInsert) } return toInsertWeak } var ptr *T for { // Check the map. wp, ok := m.Load(value) if !ok { // Try to insert a new value into the map. wp, _ = m.LoadOrStore(value, newValue()) } // Now that we're sure there's a value in the map, let's // try to get the pointer we need out of it. ptr = wp.Strong() if ptr != nil { break }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 22 16:01:55 UTC 2024 - 5.3K bytes - Viewed (0) -
src/cmd/compile/internal/test/mergelocals_test.go
testcases := []struct { vars []*ir.Name partition map[*ir.Name][]int experr bool }{ { vars: []*ir.Name{v1, v2, v3}, partition: map[*ir.Name][]int{ v1: []int{0, 1, 2}, v2: []int{0, 1, 2}, v3: []int{0, 1, 2}, }, experr: false, }, { // invalid mls.v slot -1 vars: []*ir.Name{v1, v2, v3}, partition: map[*ir.Name][]int{ v1: []int{-1, 0}, v2: []int{0, 1, 2},
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Apr 18 15:43:53 UTC 2024 - 4.7K bytes - Viewed (0) -
doc/next/6-stdlib/99-minor/sync/61696.md
The [Map.Clear] method deletes all the entries, resulting in
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Apr 10 17:07:25 UTC 2024 - 105 bytes - Viewed (0) -
src/mime/type.go
"sync" ) var ( mimeTypes sync.Map // map[string]string; ".Z" => "application/x-compress" mimeTypesLower sync.Map // map[string]string; ".z" => "application/x-compress" // extensions maps from MIME type to list of lowercase file // extensions: "image/jpeg" => [".jpg", ".jpeg"] extensionsMu sync.Mutex // Guards stores (but not loads) on extensions. extensions sync.Map // map[string][]string; slice values are append-only. )
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 5K bytes - Viewed (0) -
src/internal/fmtsort/sort.go
// that are valid map keys. package fmtsort import ( "cmp" "reflect" "slices" ) // Note: Throughout this package we avoid calling reflect.Value.Interface as // it is not always legal to do so and it's easier to avoid the issue than to face it. // SortedMap is a slice of KeyValue pairs that simplifies sorting // and iterating over map entries. //
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 20 19:31:45 UTC 2024 - 4.9K bytes - Viewed (0)