Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 523 for Map (0.06 sec)

  1. 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)
  2. src/crypto/internal/hpke/hpke_test.go

    }
    
    func parseVectorSetup(vector string) map[string]string {
    	vals := map[string]string{}
    	for _, l := range strings.Split(vector, "\n") {
    		fields := strings.Split(l, ": ")
    		vals[fields[0]] = fields[1]
    	}
    	return vals
    }
    
    func parseVectorEncryptions(vector string) []map[string]string {
    	vals := []map[string]string{}
    	for _, section := range strings.Split(vector, "\n\n") {
    		e := map[string]string{}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 22:33:33 UTC 2024
    - 4.7K bytes
    - Viewed (0)
  3. src/reflect/benchmark_test.go

    }
    
    func BenchmarkMap(b *testing.B) {
    	type V *int
    	type S string
    	value := ValueOf((V)(nil))
    	stringKeys := []string{}
    	mapOfStrings := map[string]V{}
    	uint64Keys := []uint64{}
    	mapOfUint64s := map[uint64]V{}
    	userStringKeys := []S{}
    	mapOfUserStrings := map[S]V{}
    	for i := 0; i < 100; i++ {
    		stringKey := fmt.Sprintf("key%d", i)
    		stringKeys = append(stringKeys, stringKey)
    		mapOfStrings[stringKey] = nil
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sun Nov 19 17:09:03 UTC 2023
    - 8.8K bytes
    - Viewed (0)
  4. 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)
  5. 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)
  6. test/fixedbugs/issue54722b.go

    package p
    
    type value[V comparable] struct {
    	node  *node[value[V]]
    	value V
    }
    
    type node[V comparable] struct {
    	index    *index[V]
    	children map[string]*node[V]
    }
    
    type index[V comparable] struct {
    	arrays []array[V]
    }
    
    type array[V comparable] struct {
    	valueMap map[int]V
    }
    
    var x value[int]
    var y value[*Column]
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Aug 30 17:23:27 UTC 2022
    - 523 bytes
    - Viewed (0)
  7. src/testing/slogtest/example_test.go

    // format when given a pointer to a map[string]any.
    func Example_parsing() {
    	var buf bytes.Buffer
    	h := slog.NewJSONHandler(&buf, nil)
    
    	results := func() []map[string]any {
    		var ms []map[string]any
    		for _, line := range bytes.Split(buf.Bytes(), []byte{'\n'}) {
    			if len(line) == 0 {
    				continue
    			}
    			var m map[string]any
    			if err := json.Unmarshal(line, &m); err != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 04 18:32:54 UTC 2023
    - 1.1K bytes
    - Viewed (0)
  8. test/fixedbugs/notinheap.go

    // Test type-checking errors for go:notinheap.
    
    package p
    
    //go:notinheap
    type nih struct{}
    
    type embed4 map[nih]int // ERROR "incomplete \(or unallocatable\) map key not allowed"
    
    type embed5 map[int]nih // ERROR "incomplete \(or unallocatable\) map value not allowed"
    
    type emebd6 chan nih // ERROR "chan of incomplete \(or unallocatable\) type not allowed"
    
    type okay1 *nih
    
    type okay2 []nih
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Sep 02 17:46:15 UTC 2022
    - 1.3K bytes
    - Viewed (0)
  9. 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)
  10. 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)
Back to top