Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for WidthCap (0.21 sec)

  1. internal/bpool/bpool_test.go

    	// Check the width
    	if bufPool.Width() != width {
    		t.Fatalf("bytepool width invalid: got %v want %v", bufPool.Width(), width)
    	}
    
    	// Check with width cap
    	if bufPool.WidthCap() != capWidth {
    		t.Fatalf("bytepool capWidth invalid: got %v want %v", bufPool.WidthCap(), capWidth)
    	}
    
    	// Check that retrieved buffer are of the expected width
    	b := bufPool.Get()
    	if len(b) != width {
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Tue Jan 30 19:13:27 GMT 2024
    - 2.6K bytes
    - Viewed (0)
  2. internal/bpool/bpool.go

    	}
    }
    
    // Width returns the width of the byte arrays in this pool.
    func (bp *BytePoolCap) Width() (n int) {
    	if bp == nil {
    		return 0
    	}
    	return bp.w
    }
    
    // WidthCap returns the cap width of the byte arrays in this pool.
    func (bp *BytePoolCap) WidthCap() (n int) {
    	if bp == nil {
    		return 0
    	}
    	return bp.wcap
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Fri Apr 19 16:44:59 GMT 2024
    - 2.6K bytes
    - Viewed (0)
Back to top