Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for Brown (0.16 sec)

  1. src/bytes/buffer.go

    	return nil
    }
    
    // WriteRune appends the UTF-8 encoding of Unicode code point r to the
    // buffer, returning its length and an error, which is always nil but is
    // included to match [bufio.Writer]'s WriteRune. The buffer is grown as needed;
    // if it becomes too large, WriteRune will panic with [ErrTooLarge].
    func (b *Buffer) WriteRune(r rune) (n int, err error) {
    	// Compare as uint32 to correctly handle negative runes.
    	if uint32(r) < utf8.RuneSelf {
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Fri Oct 13 17:10:31 GMT 2023
    - 15.7K bytes
    - Viewed (0)
  2. src/bytes/buffer_test.go

    func (r panicReader) Read(p []byte) (int, error) {
    	if r.panic {
    		panic("oops")
    	}
    	return 0, io.EOF
    }
    
    // Make sure that an empty Buffer remains empty when
    // it is "grown" before a Read that panics
    func TestReadFromPanicReader(t *testing.T) {
    
    	// First verify non-panic behaviour
    	var buf Buffer
    	i, err := buf.ReadFrom(panicReader{})
    	if err != nil {
    		t.Fatal(err)
    	}
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Thu Apr 20 01:07:29 GMT 2023
    - 18.1K bytes
    - Viewed (0)
Back to top