Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for ErrIsEmpty (0.07 sec)

  1. internal/ringbuffer/ring_buffer.go

    	ErrTooMuchDataToWrite = errors.New("too much data to write")
    
    	// ErrIsFull is returned when the buffer is full and not blocking.
    	ErrIsFull = errors.New("ringbuffer is full")
    
    	// ErrIsEmpty is returned when the buffer is empty and not blocking.
    	ErrIsEmpty = errors.New("ringbuffer is empty")
    
    	// ErrIsNotEmpty is returned when the buffer is not empty and not blocking.
    	ErrIsNotEmpty = errors.New("ringbuffer is not empty")
    
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Wed May 15 00:11:04 UTC 2024
    - 13.3K bytes
    - Viewed (0)
  2. internal/ringbuffer/ring_buffer_test.go

    	}
    
    	// read empty
    	buf := make([]byte, 1024)
    	n, err := rb.Read(buf)
    	if err == nil {
    		t.Fatalf("expect an error but got nil")
    	}
    	if err != ErrIsEmpty {
    		t.Fatalf("expect ErrIsEmpty but got nil")
    	}
    	if n != 0 {
    		t.Fatalf("expect read 0 bytes but got %d", n)
    	}
    	if rb.Length() != 0 {
    		t.Fatalf("expect len 0 bytes but got %d. r.w=%d, r.r=%d", rb.Length(), rb.w, rb.r)
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Wed May 15 00:11:04 UTC 2024
    - 26.8K bytes
    - Viewed (0)
Back to top