Search Options

Results per page
Sort
Preferred Languages
Advance

Results 151 - 160 of 638 for Map (0.03 sec)

  1. src/net/http/mapping_test.go

    					entries = append(entries, entry[string, any]{c, nil})
    				}
    				b.ResetTimer()
    				for i := 0; i < b.N; i++ {
    					findChildLinear(key, entries)
    				}
    			})
    			b.Run("rep=map", func(b *testing.B) {
    				m := map[string]any{}
    				for _, c := range list {
    					m[c] = nil
    				}
    				var x any
    				b.ResetTimer()
    				for i := 0; i < b.N; i++ {
    					x = m[key]
    				}
    				_ = x
    			})
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Sep 12 17:47:07 UTC 2023
    - 2.9K bytes
    - Viewed (0)
  2. src/plugin/plugin_dlopen.go

    	// This function can be called from the init function of a plugin.
    	// Drop a placeholder in the map so subsequent opens can wait on it.
    	p := &Plugin{
    		pluginpath: pluginpath,
    		loaded:     make(chan struct{}),
    	}
    	plugins[filepath] = p
    	pluginsMu.Unlock()
    
    	doInit(initTasks)
    
    	// Fill out the value of each plugin symbol.
    	updatedSyms := map[string]any{}
    	for symName, sym := range syms {
    		isFunc := symName[0] == '.'
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 14 16:55:22 UTC 2023
    - 3.9K bytes
    - Viewed (0)
  3. test/fixedbugs/issue66096.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package p
    
    type Message struct {
    	Header map[string][]string
    }
    
    func f() {
    	m := Message{Header: map[string][]string{}}
    	m.Header[""] = append([]string(m.Header[""]), "")
    	_ = m
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Mar 08 02:00:33 UTC 2024
    - 352 bytes
    - Viewed (0)
  4. src/cmd/compile/internal/types2/self_test.go

    		}
    		var info *Info
    		if writeInfo {
    			info = &Info{
    				Types:      make(map[syntax.Expr]TypeAndValue),
    				Defs:       make(map[*syntax.Name]Object),
    				Uses:       make(map[*syntax.Name]Object),
    				Implicits:  make(map[syntax.Node]Object),
    				Selections: make(map[*syntax.SelectorExpr]*Selection),
    				Scopes:     make(map[syntax.Node]*Scope),
    			}
    		}
    		if _, err := conf.Check(path, files, info); err != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 23 19:39:00 UTC 2023
    - 2.8K bytes
    - Viewed (0)
  5. src/runtime/covermeta.go

    	id := rtcov.AddMeta(p, dlen, hash, pkgpath, pkgid, cmode, cgran)
    	if id == 0 {
    		throw("runtime.addCovMeta: coverage package map collision")
    	}
    	return id
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 09:57:47 UTC 2024
    - 603 bytes
    - Viewed (0)
  6. test/typeparam/maps.go

    	}
    	return true
    }
    
    // _Keys returns the keys of the map m.
    // The keys will be an indeterminate order.
    func _Keys[K comparable, V any](m map[K]V) []K {
    	r := make([]K, 0, len(m))
    	for k := range m {
    		r = append(r, k)
    	}
    	return r
    }
    
    // _Values returns the values of the map m.
    // The values will be in an indeterminate order.
    func _Values[K comparable, V any](m map[K]V) []V {
    	r := make([]V, 0, len(m))
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 01 19:45:34 UTC 2022
    - 5.9K bytes
    - Viewed (0)
  7. src/internal/types/testdata/fixedbugs/issue39755.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package p
    
    func _[T interface{~map[string]int}](x T) {
    	_ = x == nil
    }
    
    // simplified test case from issue
    
    type PathParamsConstraint interface {
            ~map[string]string | ~[]struct{key, value string}
    }
    
    type PathParams[T PathParamsConstraint] struct {
    	t T
    }
    
    func (pp *PathParams[T]) IsNil() bool {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Sep 02 02:58:32 UTC 2022
    - 507 bytes
    - Viewed (0)
  8. src/sync/map_test.go

    	for _, c := range calls {
    		v, ok := c.apply(m)
    		results = append(results, mapResult{v, ok})
    	}
    
    	final = make(map[any]any)
    	m.Range(func(k, v any) bool {
    		final[k] = v
    		return true
    	})
    
    	return results, final
    }
    
    func applyMap(calls []mapCall) ([]mapResult, map[any]any) {
    	return applyCalls(new(sync.Map), calls)
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Feb 01 15:34:22 UTC 2024
    - 8.1K bytes
    - Viewed (0)
  9. src/internal/types/testdata/fixedbugs/issue45635.go

    func main() {
    	some /* ERROR "undefined" */ [int, int]()
    }
    
    type N[T any] struct{}
    
    var _ N [] // ERROR "expected type argument list"
    
    type I interface {
    	~[]int
    }
    
    func _[T I](i, j int) {
    	var m map[int]int
    	_ = m[i, j /* ERROR "more than one index" */ ]
    
    	var a [3]int
    	_ = a[i, j /* ERROR "more than one index" */ ]
    
    	var s []int
    	_ = s[i, j /* ERROR "more than one index" */ ]
    
    	var t T
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jan 17 19:54:25 UTC 2023
    - 615 bytes
    - Viewed (0)
  10. test/typeparam/graph.go

    // as an ordered list of edges. If there are multiple shortest paths,
    // which one is returned is unpredictable.
    func (g *_Graph[_Node, _Edge]) ShortestPath(from, to _Node) ([]_Edge, error) {
    	visited := make(map[_Node]bool)
    	visited[from] = true
    	workqueue := []nodePath[_Node, _Edge]{nodePath[_Node, _Edge]{from, nil}}
    	for len(workqueue) > 0 {
    		current := workqueue
    		workqueue = nil
    		for _, np := range current {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 26 19:58:28 UTC 2024
    - 5.7K bytes
    - Viewed (0)
Back to top