Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for makeTag (0.09 sec)

  1. src/reflect/value.go

    		panic("reflect.MakeChan: unidirectional channel type")
    	}
    	t := typ.common()
    	ch := makechan(t, buffer)
    	return Value{t, ch, flag(Chan)}
    }
    
    // MakeMap creates a new map with the specified type.
    func MakeMap(typ Type) Value {
    	return MakeMapWithSize(typ, 0)
    }
    
    // MakeMapWithSize creates a new map with the specified type
    // and initial space for approximately n elements.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 21:17:41 UTC 2024
    - 119.9K bytes
    - Viewed (0)
  2. src/reflect/all_test.go

    func TestMap(t *testing.T) {
    	m := map[string]int{"a": 1, "b": 2}
    	mv := ValueOf(m)
    	if n := mv.Len(); n != len(m) {
    		t.Errorf("Len = %d, want %d", n, len(m))
    	}
    	keys := mv.MapKeys()
    	newmap := MakeMap(mv.Type())
    	for k, v := range m {
    		// Check that returned Keys match keys in range.
    		// These aren't required to be in the same order.
    		seen := false
    		for _, kv := range keys {
    			if kv.String() == k {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 218.8K bytes
    - Viewed (0)
Back to top