Search Options

Results per page
Sort
Preferred Languages
Advance

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

  1. src/os/os_test.go

    }
    
    // Test that all File methods give ErrInvalid if the receiver is nil.
    func TestNilFileMethods(t *testing.T) {
    	t.Parallel()
    
    	for _, tt := range nilFileMethodTests {
    		var file *File
    		got := tt.f(file)
    		if got != ErrInvalid {
    			t.Errorf("%v should fail when f is nil; got %v", tt.name, got)
    		}
    	}
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 83.1K bytes
    - Viewed (0)
  2. src/net/http/fs_test.go

    func (f *fakeFile) Close() error               { return nil }
    func (f *fakeFile) Stat() (fs.FileInfo, error) { return f.fi, nil }
    func (f *fakeFile) Readdir(count int) ([]fs.FileInfo, error) {
    	if !f.fi.dir {
    		return nil, fs.ErrInvalid
    	}
    	var fis []fs.FileInfo
    
    	limit := f.entpos + count
    	if count <= 0 || limit > len(f.fi.ents) {
    		limit = len(f.fi.ents)
    	}
    	for ; f.entpos < limit; f.entpos++ {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 15 23:39:44 UTC 2024
    - 49.9K bytes
    - Viewed (0)
Back to top