- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 201 for Map (0.96 sec)
-
src/internal/concurrent/hashtriemap_test.go
}) } func testAll[K, V comparable](t *testing.T, m *HashTrieMap[K, V], testData map[K]V, yield func(K, V) bool) { for k, v := range testData { expectStored(t, k, v)(m.LoadOrStore(k, v)) } visited := make(map[K]int) m.All()(func(key K, got V) bool { want, ok := testData[key] if !ok { t.Errorf("unexpected key %v in map", key) return false } if got != want {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 22 16:01:55 UTC 2024 - 9.3K 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/text/template/template.go
return t } // Funcs adds the elements of the argument map to the template's function map. // It must be called before the template is parsed. // It panics if a value in the map is not a function with appropriate return // type or if the name cannot be used syntactically as a function in a template. // It is legal to overwrite elements of the map. The return value is the template, // so calls can be chained.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Feb 26 20:57:51 UTC 2024 - 7.2K bytes - Viewed (0) -
src/cmd/compile/internal/ssagen/nowb.go
// get back to the ODCLFUNCs. symToFunc := make(map[*obj.LSym]*ir.Func) // funcs records the back-edges of the BFS call graph walk. It // maps from the ODCLFUNC of each function that must not have // write barriers to the call that inhibits them. Functions // that are directly marked go:nowritebarrierrec are in this // map with a zero-valued nowritebarrierrecCall. This also
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 15 17:29:46 UTC 2024 - 5.9K bytes - Viewed (0) -
src/go/types/resolver_test.go
files = append(files, mustParse(fset, src)) } // resolve and type-check package AST importer := new(resolveTestImporter) conf := Config{Importer: importer} uses := make(map[*ast.Ident]Object) defs := make(map[*ast.Ident]Object) _, err := conf.Check("testResolveIdents", fset, files, &Info{Defs: defs, Uses: uses}) if err != nil { t.Fatal(err) } // check that all packages were imported
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 4.5K bytes - Viewed (0) -
src/sync/map_reference_test.go
} func (m *DeepCopyMap) Range(f func(key, value any) (shouldContinue bool)) { clean, _ := m.clean.Load().(map[any]any) for k, v := range clean { if !f(k, v) { break } } } func (m *DeepCopyMap) dirty() map[any]any { clean, _ := m.clean.Load().(map[any]any) dirty := make(map[any]any, len(clean)+1) for k, v := range clean { dirty[k] = v } return dirty }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Feb 01 15:34:22 UTC 2024 - 5.6K bytes - Viewed (0) -
src/cmd/internal/pgo/pgo.go
CalleeName string CallSiteOffset int // Line offset from function start line. } // NamedEdgeMap contains all unique call edges in the profile and their // edge weight. type NamedEdgeMap struct { Weight map[NamedCallEdge]int64 // ByWeight lists all keys in Weight, sorted by edge weight from // highest to lowest. ByWeight []NamedCallEdge } func emptyProfile() *Profile {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Mar 27 20:20:01 UTC 2024 - 1.6K bytes - Viewed (0) -
src/os/signal/signal.go
import ( "context" "os" "sync" ) var handlers struct { sync.Mutex // Map a channel to the signals that should be sent to it. m map[chan<- os.Signal]*handler // Map a signal to the number of channels receiving it. ref [numSig]int64 // Map channels to signals while the channel is being stopped. // Not a map because entries live here only very briefly.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Feb 26 21:33:12 UTC 2024 - 8.3K bytes - Viewed (0) -
src/mime/multipart/formdata.go
multipartmaxparts = godebug.New("multipartmaxparts") ) func (r *Reader) readForm(maxMemory int64) (_ *Form, err error) { form := &Form{make(map[string][]string), make(map[string][]*FileHeader)} var ( file *os.File fileOff int64 ) numDiskFiles := 0 combineFiles := true if multipartfiles.Value() == "distinct" { combineFiles = false
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Mar 21 16:12:35 UTC 2024 - 7.7K bytes - Viewed (0) -
src/cmd/go/internal/par/work.go
) // Work manages a set of work items to be executed in parallel, at most once each. // The items in the set must all be valid map keys. type Work[T comparable] struct { f func(T) // function to run for each item running int // total number of runners mu sync.Mutex added map[T]bool // items added to set todo []T // items yet to be run wait sync.Cond // wait when todo is empty
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 13 15:54:54 UTC 2024 - 4.3K bytes - Viewed (0)