- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 343 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/cmd/vendor/golang.org/x/telemetry/internal/config/config.go
type Config struct { *telemetry.UploadConfig program map[string]bool goos map[string]bool goarch map[string]bool goversion map[string]bool pgversion map[pgkey]bool pgcounter map[pgkey]bool pgcounterprefix map[pgkey]bool pgstack map[pgkey]bool rate map[pgkey]float64 } type pgkey struct { program, key string }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Mar 04 17:57:25 UTC 2024 - 3.5K bytes - Viewed (0) -
test/typeparam/builtins.go
} func f4[T C5[X], X any](ch T) { close(ch) } // delete type M0 interface{ int } type M1 interface{ map[string]int } type M2 interface { map[string]int | map[string]float64 } type M3 interface{ map[string]int | map[rune]int } type M4[K comparable, V any] interface{ map[K]V | map[rune]V } func g1[T M1](m T) { delete(m, "foo") } func g2[T M2](m T) { delete(m, "foo") }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Mar 25 09:04:48 UTC 2024 - 1.8K 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) -
test/fixedbugs/issue63505.go
package main type explainer struct { m map[string]string } func init() { RegisterExplainer(newExplainer()) } type Explainer interface { Name() string Map() map[string]string } func (e explainer) Name() string { return "HelloWorldExplainer" } func (e explainer) Map() map[string]string { return e.m } //go:noinline func newExplainer() explainer {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 12 00:48:31 UTC 2023 - 736 bytes - Viewed (0) -
src/reflect/deepequal.go
// Visited comparisons are stored in a map indexed by visit. type visit struct { a1 unsafe.Pointer a2 unsafe.Pointer typ Type } // Tests for deep equality using reflected types. The map argument tracks // comparisons that have already been seen, which allows short circuiting on // recursive types. func deepValueEqual(v1, v2 Value, visited map[visit]bool) bool { if !v1.IsValid() || !v2.IsValid() {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Mar 04 17:34:30 UTC 2024 - 7.4K 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)