Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 1,157 for width (0.17 sec)

  1. internal/bpool/bpool_test.go

    	}
    
    	bufPoolNoCap := NewBytePoolCap(size, width, 0)
    	// Check the width
    	if bufPoolNoCap.Width() != width {
    		t.Fatalf("bytepool width invalid: got %v want %v", bufPool.Width(), width)
    	}
    
    	// Check with width cap
    	if bufPoolNoCap.WidthCap() != 0 {
    		t.Fatalf("bytepool capWidth invalid: got %v want %v", bufPool.WidthCap(), 0)
    	}
    	b = bufPoolNoCap.Get()
    	if len(b) != width {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Jan 30 19:13:27 GMT 2024
    - 2.6K bytes
    - Viewed (0)
  2. cmd/update-notifier.go

    	maxContentWidth := max(line1Length, line2Length)
    
    	// termWidth is set to a default one to use when we are
    	// not able to calculate terminal width via OS syscalls
    	termWidth := 25
    	if width, err := pb.GetTerminalWidth(); err == nil {
    		termWidth = width
    	}
    
    	// Box cannot be printed if terminal width is small than maxContentWidth
    	if maxContentWidth > termWidth {
    		return "\n" + line1InColor + "\n" + line2InColor + "\n\n"
    	}
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sat Mar 09 03:07:08 GMT 2024
    - 3.6K bytes
    - Viewed (0)
  3. internal/bpool/bpool.go

    		// buffer went back into pool
    	default:
    		// buffer didn't go back into pool, just discard
    	}
    }
    
    // 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 May 05 19:28:20 GMT 2024
    - Last Modified: Fri Apr 19 16:44:59 GMT 2024
    - 2.6K bytes
    - Viewed (0)
  4. src/bufio/scan.go

    		return 1, data[0:1], nil
    	}
    
    	// Fast path 2: Correct UTF-8 decode without error.
    	_, width := utf8.DecodeRune(data)
    	if width > 1 {
    		// It's a valid encoding. Width cannot be one for a correctly encoded
    		// non-ASCII rune.
    		return width, data[0:width], nil
    	}
    
    	// We know it's an error: we have width==1 and implicitly r==utf8.RuneError.
    	// Is the error because there wasn't a full rune to be decoded?
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Mon Oct 23 09:06:30 GMT 2023
    - 14.2K bytes
    - Viewed (0)
  5. src/bytes/bytes.go

    				}
    			}
    			return -1
    		}
    	}
    	var width int
    	for i := 0; i < len(s); i += width {
    		r := rune(s[i])
    		if r < utf8.RuneSelf {
    			if bytealg.IndexByteString(chars, s[i]) >= 0 {
    				return i
    			}
    			width = 1
    			continue
    		}
    		r, width = utf8.DecodeRune(s[i:])
    		if r != utf8.RuneError {
    			// r is 2 to 4 bytes
    			if len(chars) == width {
    				if chars == string(r) {
    					return i
    				}
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Mon Feb 19 19:51:15 GMT 2024
    - 33.8K bytes
    - Viewed (0)
  6. cmd/streaming-signature-v4.go

    			cr.err = err
    			return n, cr.err
    		}
    		if b == ';' { // separating character
    			break
    		}
    
    		// Manually deserialize the size since AWS specified
    		// the chunk size to be of variable width. In particular,
    		// a size of 16 is encoded as `10` while a size of 64 KB
    		// is `10000`.
    		switch {
    		case b >= '0' && b <= '9':
    			size = size<<4 | int(b-'0')
    		case b >= 'a' && b <= 'f':
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Jan 18 07:03:17 GMT 2024
    - 18.2K bytes
    - Viewed (0)
  7. src/archive/tar/strconv_test.go

    		{math.MinInt64, 9, true},
    		{math.MaxInt64, 12, true},
    		{0, 12, true},
    		{math.MinInt64, 12, true},
    	}
    
    	for _, v := range vectors {
    		ok := fitsInBase256(v.width, v.in)
    		if ok != v.ok {
    			t.Errorf("fitsInBase256(%d, %d): got %v, want %v", v.in, v.width, ok, v.ok)
    		}
    	}
    }
    
    func TestParseNumeric(t *testing.T) {
    	vectors := []struct {
    		in   string
    		want int64
    		ok   bool
    	}{
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Tue Feb 09 05:28:50 GMT 2021
    - 14K bytes
    - Viewed (0)
  8. src/cmd/asm/internal/arch/arm.go

    		return true
    	}
    	return false
    }
    
    // IsARMBFX reports whether the op (as defined by an arm.A* constant) is one the
    // BFX-like instructions which are in the form of "op $width, $LSB, (Reg,) Reg".
    func IsARMBFX(op obj.As) bool {
    	switch op {
    	case arm.ABFX, arm.ABFXU, arm.ABFC, arm.ABFI:
    		return true
    	}
    	return false
    }
    
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Fri Nov 18 17:59:44 GMT 2022
    - 6.1K bytes
    - Viewed (0)
  9. clause/with.go

    package clause
    
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Thu Jan 06 07:02:53 GMT 2022
    - 35 bytes
    - Viewed (0)
  10. cmd/streaming-v4-unsigned.go

    func (cr *s3UnsignedChunkedReader) readTrailers() error {
    	var valueBuffer bytes.Buffer
    	// Read value
    	for {
    		v, err := cr.reader.ReadByte()
    		if err != nil {
    			if err == io.EOF {
    				return io.ErrUnexpectedEOF
    			}
    		}
    		if v != '\r' {
    			valueBuffer.WriteByte(v)
    			continue
    		}
    		// Must end with \r\n\r\n
    		var tmp [3]byte
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sat May 06 02:53:12 GMT 2023
    - 6.1K bytes
    - Viewed (1)
Back to top