Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 591 for elem5 (0.05 sec)

  1. utils/utils_test.go

    		name  string
    		elems []string
    		elem  string
    		out   bool
    	}{
    		{"exists", []string{"1", "2", "3"}, "1", true},
    		{"not exists", []string{"1", "2", "3"}, "4", false},
    	}
    	for _, test := range containsTests {
    		t.Run(test.name, func(t *testing.T) {
    			if out := Contains(test.elems, test.elem); test.out != out {
    				t.Errorf("Contains(%v, %s) want: %t, got: %t", test.elems, test.elem, test.out, out)
    			}
    		})
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Mon Feb 19 03:42:25 UTC 2024
    - 3.6K bytes
    - Viewed (0)
  2. src/internal/abi/map.go

    const (
    	// Maximum number of key/elem pairs a bucket can hold.
    	MapBucketCountBits = 3 // log2 of number of elements in a bucket.
    	MapBucketCount     = 1 << MapBucketCountBits
    
    	// Maximum key or elem size to keep inline (instead of mallocing per element).
    	// Must fit in a uint8.
    	// Note: fast map functions cannot handle big elems (bigger than MapMaxElemBytes).
    	MapMaxKeyBytes  = 128
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Apr 22 20:09:01 UTC 2024
    - 719 bytes
    - Viewed (0)
  3. utils/utils.go

    			if vv.IsValid() && !vv.IsZero() {
    				results[idx] = fmt.Sprint(reflect.Indirect(vv).Interface())
    			}
    		}
    	}
    
    	return strings.Join(results, "_")
    }
    
    func Contains(elems []string, elem string) bool {
    	for _, e := range elems {
    		if elem == e {
    			return true
    		}
    	}
    	return false
    }
    
    func AssertEqual(x, y interface{}) bool {
    	if reflect.DeepEqual(x, y) {
    		return true
    	}
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Mon Apr 22 06:43:02 UTC 2024
    - 3.8K bytes
    - Viewed (0)
  4. src/cmd/vendor/github.com/google/pprof/internal/driver/html/stacks.js

      function addElem(src, elem) {
        let list = elems.get(src);
        if (!list) {
          list = [];
          elems.set(src, list);
        }
        list.push(elem);
        elem.classList.toggle('hilite', matches.has(src));
      }
    
      // Adds or removes cl from classList of all elements for the specified source.
      function toggleClass(src, cl, value) {
        const list = elems.get(src);
        if (list) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 31 19:48:28 UTC 2024
    - 18.5K bytes
    - Viewed (0)
  5. src/cmd/compile/internal/typecheck/iexport.go

    //
    //     type PointerType struct {
    //         Tag  itag // pointerType
    //         Elem typeOff
    //     }
    //
    //     type SliceType struct {
    //         Tag  itag // sliceType
    //         Elem typeOff
    //     }
    //
    //     type ArrayType struct {
    //         Tag  itag // arrayType
    //         Len  uint64
    //         Elem typeOff
    //     }
    //
    //     type ChanType struct {
    //         Tag  itag   // chanType
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jul 21 02:40:02 UTC 2023
    - 6.8K bytes
    - Viewed (0)
  6. test/escape_reflect.go

    	v := reflect.ValueOf(x) // ERROR "x escapes to heap"
    	return v.Slice(1, 2).Bytes()
    }
    
    func elem1(x *int) int { // ERROR "x does not escape"
    	v := reflect.ValueOf(x)
    	return int(v.Elem().Int())
    }
    
    func elem2(x *string) string { // ERROR "leaking param: x to result ~r0 level=1"
    	v := reflect.ValueOf(x)
    	return string(v.Elem().String())
    }
    
    type S struct {
    	A int
    	B *int
    	C string
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Sep 08 18:50:24 UTC 2023
    - 13.1K bytes
    - Viewed (0)
  7. src/go/types/mono.go

    	// parameters that it's implicitly parameterized by.
    	for scope := obj.Parent(); scope != root; scope = scope.Parent() {
    		for _, elem := range scope.elems {
    			if elem, ok := elem.(*TypeName); ok && !elem.IsAlias() && cmpPos(elem.Pos(), obj.Pos()) < 0 {
    				if tpar, ok := elem.Type().(*TypeParam); ok {
    					if idx < 0 {
    						idx = len(w.vertices)
    						w.vertices = append(w.vertices, monoVertex{obj: obj})
    					}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Apr 03 18:48:38 UTC 2024
    - 9.2K bytes
    - Viewed (0)
  8. src/cmd/compile/internal/types2/mono.go

    	// parameters that it's implicitly parameterized by.
    	for scope := obj.Parent(); scope != root; scope = scope.Parent() {
    		for _, elem := range scope.elems {
    			if elem, ok := elem.(*TypeName); ok && !elem.IsAlias() && cmpPos(elem.Pos(), obj.Pos()) < 0 {
    				if tpar, ok := elem.Type().(*TypeParam); ok {
    					if idx < 0 {
    						idx = len(w.vertices)
    						w.vertices = append(w.vertices, monoVertex{obj: obj})
    					}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Feb 28 00:05:29 UTC 2024
    - 9.1K bytes
    - Viewed (0)
  9. src/encoding/gob/decode.go

    	elemIsPtr := mtyp.Elem().Kind() == reflect.Pointer
    	keyInstr := &decInstr{keyOp, 0, nil, ovfl}
    	elemInstr := &decInstr{elemOp, 0, nil, ovfl}
    	keyP := reflect.New(mtyp.Key())
    	elemP := reflect.New(mtyp.Elem())
    	for i := 0; i < n; i++ {
    		key := decodeIntoValue(state, keyOp, keyIsPtr, keyP.Elem(), keyInstr)
    		elem := decodeIntoValue(state, elemOp, elemIsPtr, elemP.Elem(), elemInstr)
    		value.SetMapIndex(key, elem)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Sep 07 19:10:23 UTC 2023
    - 40.1K bytes
    - Viewed (0)
  10. src/cmd/vendor/golang.org/x/tools/go/analysis/passes/tests/tests.go

    		if !found {
    			pass.Reportf(fn.Pos(), "%s refers to unknown field or method: %s.%s", fnName, ident, mmbr)
    		}
    	}
    	if len(elems) == 3 && !isExampleSuffix(elems[2]) {
    		// Check ExampleFoo_Method_suffix and ExampleFoo_Method_Badsuffix.
    		pass.Reportf(fn.Pos(), "%s has malformed example suffix: %s", fnName, elems[2])
    	}
    }
    
    type tokenRange struct {
    	p, e token.Pos
    }
    
    func (r tokenRange) Pos() token.Pos {
    	return r.p
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 03 02:38:00 UTC 2024
    - 14.4K bytes
    - Viewed (0)
Back to top