Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for checkFileRead (0.15 sec)

  1. src/testing/fstest/testfs.go

    	// Check that ReadFile works if present.
    	if fsys, ok := t.fsys.(fs.ReadFileFS); ok {
    		data2, err := fsys.ReadFile(file)
    		if err != nil {
    			t.errorf("%s: fsys.ReadFile: %w", file, err)
    			return
    		}
    		t.checkFileRead(file, "ReadAll vs fsys.ReadFile", data, data2)
    
    		// Modify the data and check it again. Modifying the
    		// returned byte slice should not affect the next call.
    		for i := range data2 {
    			data2[i]++
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 16.3K bytes
    - Viewed (0)
Back to top