- Sort Score
- Result 10 results
- Languages All
Results 101 - 110 of 642 for Map (0.02 sec)
-
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) -
test/codegen/mapaccess.go
m[k]-- } func mapCompoundAssignmentString() { m := make(map[string]string, 0) var k string = "key" // 386:-".*mapaccess" // amd64:-".*mapaccess" // arm:-".*mapaccess" // arm64:-".*mapaccess" m[k] += "value" } var sinkAppend bool func mapAppendAssignmentInt8() { m := make(map[int8][]int8, 0) var k int8 = 0 // 386:-".*mapaccess" // amd64:-".*mapaccess"
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Aug 18 17:36:38 UTC 2022 - 9.1K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/tools/go/analysis/passes/testinggoroutine/util.go
func localFunctionDecls(info *types.Info, files []*ast.File) func(*types.Func) *ast.FuncDecl { var fnDecls map[*types.Func]*ast.FuncDecl // computed lazily return func(f *types.Func) *ast.FuncDecl { if f != nil && fnDecls == nil { fnDecls = make(map[*types.Func]*ast.FuncDecl) for _, file := range files { for _, decl := range file.Decls { if fnDecl, ok := decl.(*ast.FuncDecl); ok {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Apr 02 02:20:05 UTC 2024 - 2.4K bytes - Viewed (0) -
src/runtime/pprof/label.go
parentLabels := labelValue(ctx) childLabels := make(labelMap, len(parentLabels)) // TODO(matloob): replace the map implementation with something // more efficient so creating a child context WithLabels doesn't need // to clone the map. for k, v := range parentLabels { childLabels[k] = v } for _, label := range labels.list { childLabels[label.key] = label.value }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 3K bytes - Viewed (0) -
src/cmd/compile/internal/syntax/testdata/slices.go
// Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Package slices implements various slice algorithms. package slices // Map turns a []T1 to a []T2 using a mapping function. func Map[T1, T2 any](s []T1, f func(T1) T2) []T2 { r := make([]T2, len(s)) for i, v := range s { r[i] = f(v) } return r }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Mar 30 18:02:18 UTC 2022 - 1.5K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/telemetry/internal/counter/parse.go
// license that can be found in the LICENSE file. package counter import ( "bytes" "fmt" "strings" "unsafe" "golang.org/x/telemetry/internal/mmap" ) type File struct { Meta map[string]string Count map[string]uint64 } func Parse(filename string, data []byte) (*File, error) { if !bytes.HasPrefix(data, []byte(hdrPrefix)) || len(data) < pageSize { if len(data) < pageSize {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 13 14:38:01 UTC 2024 - 1.8K bytes - Viewed (0) -
src/net/internal/socktest/switch.go
// A Switch represents a callpath point switch for socket system // calls. type Switch struct { once sync.Once fmu sync.RWMutex fltab map[FilterType]Filter smu sync.RWMutex sotab Sockets stats stats } func (sw *Switch) init() { sw.fltab = make(map[FilterType]Filter) sw.sotab = make(Sockets) sw.stats = make(stats) } // Stats returns a list of per-cookie socket statistics.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Jan 10 03:29:50 UTC 2024 - 4.8K bytes - Viewed (0) -
test/fixedbugs/issue47185.go
// Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Another test to verify compiler and linker handling of multiple // competing map.zero symbol definitions.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 19 23:33:25 UTC 2023 - 315 bytes - Viewed (0) -
test/typeparam/metrics.go
"sort" "sync" ) // _Metric1 tracks metrics of values of some type. type _Metric1[T comparable] struct { mu sync.Mutex m map[T]int } // Add adds another instance of some value. func (m *_Metric1[T]) Add(v T) { m.mu.Lock() defer m.mu.Unlock() if m.m == nil { m.m = make(map[T]int) } m.m[v]++ } // Count returns the number of instances we've seen of v. func (m *_Metric1[T]) Count(v T) int {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Mar 01 19:45:34 UTC 2022 - 4.4K bytes - Viewed (0) -
src/cmd/go/internal/modload/search.go
// a global) for tags, can include or exclude packages in the standard library, // and is restricted to the given list of modules. func matchPackages(ctx context.Context, m *search.Match, tags map[string]bool, filter stdFilter, modules []module.Version) { ctx, span := trace.StartSpan(ctx, "modload.matchPackages") defer span.Done() m.Pkgs = []string{} isMatch := func(string) bool { return true }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Nov 08 17:55:15 UTC 2023 - 7.9K bytes - Viewed (0)