Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 7 of 7 for MakeMapWithSize (0.32 sec)

  1. api/go1.9.txt

    pkg net/http/fcgi, func ProcessEnv(*http.Request) map[string]string
    pkg net/http/httptest, method (*Server) Certificate() *x509.Certificate
    pkg net/http/httptest, method (*Server) Client() *http.Client
    pkg reflect, func MakeMapWithSize(Type, int) Value
    pkg runtime/pprof, func Do(context.Context, LabelSet, func(context.Context))
    pkg runtime/pprof, func ForLabels(context.Context, func(string, string) bool)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Oct 04 20:20:20 UTC 2021
    - 10.7K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apiserver/pkg/cel/value.go

    			return nil, fmt.Errorf("object fields cannot be converted to type '%v'", keyType)
    		}
    		elemType := typeDesc.Elem()
    		sz := len(sv.fieldMap)
    		ntvMap := reflect.MakeMapWithSize(typeDesc, sz)
    		for name, val := range sv.fieldMap {
    			refVal, err := val.Ref.ConvertToNative(elemType)
    			if err != nil {
    				return nil, err
    			}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Oct 10 22:05:55 UTC 2022
    - 20.5K bytes
    - Viewed (0)
  3. staging/src/k8s.io/apimachinery/pkg/runtime/converter.go

    	}
    	return false
    }
    
    func structToUnstructured(sv, dv reflect.Value) error {
    	st, dt := sv.Type(), dv.Type()
    	if dt.Kind() == reflect.Interface && dv.NumMethod() == 0 {
    		dv.Set(reflect.MakeMapWithSize(mapStringInterfaceType, st.NumField()))
    		dv = dv.Elem()
    		dt = dv.Type()
    	}
    	if dt.Kind() != reflect.Map {
    		return fmt.Errorf("cannot convert struct to: %v", dt.Kind())
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jul 11 16:02:13 UTC 2023
    - 24.9K bytes
    - Viewed (0)
  4. src/reflect/value.go

    // 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.
    func MakeMapWithSize(typ Type, n int) Value {
    	if typ.Kind() != Map {
    		panic("reflect.MakeMapWithSize of non-map type")
    	}
    	t := typ.common()
    	m := makemap(t, n)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 21:17:41 UTC 2024
    - 119.9K bytes
    - Viewed (0)
  5. src/encoding/gob/decode.go

    func (dec *Decoder) decodeMap(mtyp reflect.Type, state *decoderState, value reflect.Value, keyOp, elemOp decOp, ovfl error) {
    	n := int(state.decodeUint())
    	if value.IsNil() {
    		value.Set(reflect.MakeMapWithSize(mtyp, n))
    	}
    	keyIsPtr := mtyp.Key().Kind() == reflect.Pointer
    	elemIsPtr := mtyp.Elem().Kind() == reflect.Pointer
    	keyInstr := &decInstr{keyOp, 0, nil, ovfl}
    	elemInstr := &decInstr{elemOp, 0, nil, ovfl}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Sep 07 19:10:23 UTC 2023
    - 40.1K bytes
    - Viewed (0)
  6. src/reflect/all_test.go

    		t.Errorf("allocs per map assignment: want 0 got %f", allocs)
    	}
    
    	const size = 1000
    	tmp := 0
    	val := ValueOf(&tmp).Elem()
    	allocs = testing.AllocsPerRun(100, func() {
    		mv := MakeMapWithSize(TypeOf(map[int]int{}), size)
    		// Only adding half of the capacity to not trigger re-allocations due too many overloaded buckets.
    		for i := 0; i < size/2; i++ {
    			val.SetInt(int64(i))
    			mv.SetMapIndex(val, val)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 218.8K bytes
    - Viewed (0)
  7. src/cmd/vendor/golang.org/x/tools/internal/stdlib/manifest.go

    		{"Int8", Const, 0},
    		{"Interface", Const, 0},
    		{"Invalid", Const, 0},
    		{"Kind", Type, 0},
    		{"MakeChan", Func, 0},
    		{"MakeFunc", Func, 1},
    		{"MakeMap", Func, 0},
    		{"MakeMapWithSize", Func, 9},
    		{"MakeSlice", Func, 0},
    		{"Map", Const, 0},
    		{"MapIter", Type, 12},
    		{"MapOf", Func, 1},
    		{"Method", Type, 0},
    		{"Method.Func", Field, 0},
    		{"Method.Index", Field, 0},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 02:20:05 UTC 2024
    - 534.2K bytes
    - Viewed (0)
Back to top