Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 18 of 18 for CheckValid (0.28 sec)

  1. src/os/zero_copy_linux.go

    		return 0, true, nil
    	}
    
    	var src *File
    	switch v := r.(type) {
    	case *File:
    		src = v
    	case fileWithoutWriteTo:
    		src = v.File
    	default:
    		return 0, false, nil
    	}
    
    	if src.checkValid("ReadFrom") != nil {
    		// Avoid returning the error as we report handled as false,
    		// leave further error handling as the responsibility of the caller.
    		return 0, false, nil
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 26 18:12:56 UTC 2024
    - 4.6K bytes
    - Viewed (0)
  2. src/cmd/vendor/github.com/google/pprof/internal/driver/fetch.go

    			if err = p.Write(tempFile); err == nil {
    				o.UI.PrintErr("Saved profile in ", tempFile.Name())
    			}
    		}
    		if err != nil {
    			o.UI.PrintErr("Could not save profile: ", err)
    		}
    	}
    
    	if err := p.CheckValid(); err != nil {
    		return nil, err
    	}
    
    	return p, nil
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 31 19:48:28 UTC 2024
    - 19K bytes
    - Viewed (0)
  3. tests/integration/security/authz_test.go

    	b.from.CallOrFail(t, b.opts)
    }
    
    func (b *authzTest) BuildAndRun(t framework.TestContext) {
    	t.Helper()
    	b.Build(t).Run(t)
    }
    
    type authzTests []authzTest
    
    func (tsts authzTests) checkValid() {
    	path := tsts[0].opts.HTTP.Path
    	allow := tsts[0].allow
    	prefix := tsts[0].prefix
    	for _, tst := range tsts {
    		if tst.opts.HTTP.Path != path {
    			panic("authz tests have different paths")
    		}
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed May 08 23:36:51 UTC 2024
    - 50.1K bytes
    - Viewed (0)
  4. src/runtime/pprof/pprof_test.go

    		var w bytes.Buffer
    		Lookup("block").WriteTo(&w, 0)
    		p, err := profile.Parse(&w)
    		if err != nil {
    			t.Fatalf("failed to parse profile: %v", err)
    		}
    		t.Logf("parsed proto: %s", p)
    		if err := p.CheckValid(); err != nil {
    			t.Fatalf("invalid profile: %v", err)
    		}
    
    		stks := stacks(p)
    		for _, test := range tests {
    			if !containsStack(stks, test.stk) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 18:42:28 UTC 2024
    - 68.8K bytes
    - Viewed (0)
  5. src/encoding/json/decode_test.go

    func TestUnmarshal(t *testing.T) {
    	for _, tt := range unmarshalTests {
    		t.Run(tt.Name, func(t *testing.T) {
    			in := []byte(tt.in)
    			var scan scanner
    			if err := checkValid(in, &scan); err != nil {
    				if !equalError(err, tt.err) {
    					t.Fatalf("%s: checkValid error: %#v", tt.Where, err)
    				}
    			}
    			if tt.ptr == nil {
    				return
    			}
    
    			typ := reflect.TypeOf(tt.ptr)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 11 16:40:14 UTC 2024
    - 67.6K bytes
    - Viewed (0)
  6. src/net/http/h2_bundle.go

    			}
    		}
    	}
    	if h.StreamID != 0 {
    		fmt.Fprintf(buf, " stream=%d", h.StreamID)
    	}
    	fmt.Fprintf(buf, " len=%d", h.Length)
    }
    
    func (h *http2FrameHeader) checkValid() {
    	if !h.valid {
    		panic("Frame accessor called on non-owned Frame")
    	}
    }
    
    func (h *http2FrameHeader) invalidate() { h.valid = false }
    
    // frame header bytes.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 04 16:19:04 UTC 2024
    - 364.1K bytes
    - Viewed (0)
  7. src/encoding/json/decode.go

    // character U+FFFD.
    func Unmarshal(data []byte, v any) error {
    	// Check for well-formedness.
    	// Avoids filling out half a data structure
    	// before discovering a JSON syntax error.
    	var d decodeState
    	err := checkValid(data, &d.scan)
    	if err != nil {
    		return err
    	}
    
    	d.init(data)
    	return d.unmarshal(v)
    }
    
    // Unmarshaler is the interface implemented by types
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 00:18:55 UTC 2024
    - 35.3K bytes
    - Viewed (0)
  8. src/runtime/metrics_test.go

    		var w bytes.Buffer
    		pprof.Lookup("mutex").WriteTo(&w, 0)
    		p, err := profile.Parse(&w)
    		if err != nil {
    			t.Fatalf("failed to parse profile: %v", err)
    		}
    		if err := p.CheckValid(); err != nil {
    			t.Fatalf("invalid profile: %v", err)
    		}
    		return p
    	}
    
    	measureDelta := func(t *testing.T, fn func()) (metricGrowth, profileGrowth float64, p *profile.Profile) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 17:52:17 UTC 2024
    - 45K bytes
    - Viewed (0)
Back to top