Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 150 for ptrval (0.13 sec)

  1. src/reflect/deepequal.go

    		// For Slice or Interface, flagIndir is always set,
    		// and using v.ptr suffices.
    		ptrval := func(v Value) unsafe.Pointer {
    			switch v.Kind() {
    			case Pointer, Map:
    				return v.pointer()
    			default:
    				return v.ptr
    			}
    		}
    		addr1 := ptrval(v1)
    		addr2 := ptrval(v2)
    		if uintptr(addr1) > uintptr(addr2) {
    			// Canonicalize order to reduce number of entries in visited.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 04 17:34:30 UTC 2024
    - 7.4K bytes
    - Viewed (0)
  2. test/ken/ptrvar.go

    Rob Pike <******@****.***> 1330061064 +1100
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Feb 24 05:24:24 UTC 2012
    - 772 bytes
    - Viewed (0)
  3. test/ken/strvar.go

    Rob Pike <******@****.***> 1330061064 +1100
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Feb 24 05:24:24 UTC 2012
    - 1.1K bytes
    - Viewed (0)
  4. staging/src/k8s.io/apimachinery/pkg/util/intstr/intstr.go

    	case String:
    		isPercent := false
    		s := intOrStr.StrVal
    		if strings.HasSuffix(s, "%") {
    			isPercent = true
    			s = strings.TrimSuffix(intOrStr.StrVal, "%")
    		} else {
    			return 0, false, fmt.Errorf("invalid type: string is not a percentage")
    		}
    		v, err := strconv.Atoi(s)
    		if err != nil {
    			return 0, false, fmt.Errorf("invalid value %q: %v", intOrStr.StrVal, err)
    		}
    		return int(v), isPercent, nil
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 29 21:48:09 UTC 2024
    - 7.8K bytes
    - Viewed (0)
  5. pkg/kube/apimirror/probe.go

    )
    
    type IntOrString struct {
    	Type   Type
    	IntVal int32
    	StrVal string
    }
    
    // UnmarshalJSON implements the json.Unmarshaller interface.
    func (intstr *IntOrString) UnmarshalJSON(value []byte) error {
    	if value[0] == '"' {
    		intstr.Type = String
    		return json.Unmarshal(value, &intstr.StrVal)
    	}
    	intstr.Type = Int
    	return json.Unmarshal(value, &intstr.IntVal)
    }
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu May 23 15:07:03 UTC 2024
    - 4.4K bytes
    - Viewed (0)
  6. staging/src/k8s.io/apiserver/pkg/cel/library/regex.go

    	return []cel.ProgramOption{
    		cel.OptimizeRegex(FindRegexOptimization, FindAllRegexOptimization),
    	}
    }
    
    func find(strVal ref.Val, regexVal ref.Val) ref.Val {
    	str, ok := strVal.Value().(string)
    	if !ok {
    		return types.MaybeNoSuchOverloadErr(strVal)
    	}
    	regex, ok := regexVal.Value().(string)
    	if !ok {
    		return types.MaybeNoSuchOverloadErr(regexVal)
    	}
    	re, err := regexp.Compile(regex)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Aug 23 21:31:27 UTC 2023
    - 5.7K bytes
    - Viewed (0)
  7. tests/test_tutorial/test_response_model/test_tutorial003_02.py

    client = TestClient(app)
    
    
    def test_get_portal():
        response = client.get("/portal")
        assert response.status_code == 200, response.text
        assert response.json() == {"message": "Here's your interdimensional portal."}
    
    
    def test_get_redirect():
        response = client.get("/portal", params={"teleport": True}, follow_redirects=False)
        assert response.status_code == 307, response.text
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Fri Jun 30 18:25:16 UTC 2023
    - 3.4K bytes
    - Viewed (0)
  8. staging/src/k8s.io/apimachinery/pkg/util/intstr/instr_fuzz.go

    func (intstr *IntOrString) Fuzz(c fuzz.Continue) {
    	if intstr == nil {
    		return
    	}
    	if c.RandBool() {
    		intstr.Type = Int
    		c.Fuzz(&intstr.IntVal)
    		intstr.StrVal = ""
    	} else {
    		intstr.Type = String
    		intstr.IntVal = 0
    		c.Fuzz(&intstr.StrVal)
    	}
    }
    
    // ensure IntOrString implements fuzz.Interface
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Aug 24 19:47:49 UTC 2021
    - 1K bytes
    - Viewed (0)
  9. tests/test_tutorial/test_response_model/test_tutorial003_05_py310.py

    
    @needs_py310
    def test_get_portal(client: TestClient):
        response = client.get("/portal")
        assert response.status_code == 200, response.text
        assert response.json() == {"message": "Here's your interdimensional portal."}
    
    
    @needs_py310
    def test_get_redirect(client: TestClient):
        response = client.get("/portal", params={"teleport": True}, follow_redirects=False)
        assert response.status_code == 307, response.text
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Fri Jun 30 18:25:16 UTC 2023
    - 3.6K bytes
    - Viewed (0)
  10. pkg/probe/util_test.go

    				param: intstr.IntOrString{Type: 1, StrVal: "foo"},
    				container: &v1.Container{
    					Ports: []v1.ContainerPort{
    						{
    							Name:          "bar",
    							ContainerPort: 9000,
    						},
    					},
    				},
    			},
    			want:    0,
    			wantErr: true,
    		},
    		{
    			name: "invalid param type",
    			args: args{
    				param: intstr.IntOrString{Type: 2, StrVal: "foo"},
    				container: &v1.Container{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Mar 10 06:14:41 UTC 2023
    - 3.9K bytes
    - Viewed (0)
Back to top