Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for errorPath (0.1 sec)

  1. src/io/fs/readdir_test.go

    			}
    		})
    	}
    }
    
    func errorPath(err error) string {
    	var perr *PathError
    	if !errors.As(err, &perr) {
    		return ""
    	}
    	return perr.Path
    }
    
    func TestReadDirPath(t *testing.T) {
    	fsys := os.DirFS(t.TempDir())
    	_, err1 := ReadDir(fsys, "non-existent")
    	_, err2 := ReadDir(struct{ FS }{fsys}, "non-existent")
    	if s1, s2 := errorPath(err1), errorPath(err2); s1 != s2 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Nov 27 16:25:41 UTC 2023
    - 2.6K bytes
    - Viewed (0)
  2. src/io/fs/readfile_test.go

    	}
    }
    
    func TestReadFilePath(t *testing.T) {
    	fsys := os.DirFS(t.TempDir())
    	_, err1 := ReadFile(fsys, "non-existent")
    	_, err2 := ReadFile(struct{ FS }{fsys}, "non-existent")
    	if s1, s2 := errorPath(err1), errorPath(err2); s1 != s2 {
    		t.Fatalf("s1: %s != s2: %s", s1, s2)
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Nov 27 16:25:41 UTC 2023
    - 1.8K bytes
    - Viewed (0)
  3. src/cmd/compile/internal/staticdata/embed.go

    		for _, pattern := range e.Patterns {
    			files, ok := base.Flag.Cfg.Embed.Patterns[pattern]
    			if !ok {
    				base.ErrorfAt(e.Pos, 0, "invalid go:embed: build system did not map pattern: %s", pattern)
    			}
    			for _, file := range files {
    				if base.Flag.Cfg.Embed.Files[file] == "" {
    					base.ErrorfAt(e.Pos, 0, "invalid go:embed: build system did not map file: %s", file)
    					continue
    				}
    				if !have[file] {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Mar 10 18:22:02 UTC 2023
    - 4.8K bytes
    - Viewed (0)
  4. src/cmd/compile/internal/ssagen/nowb.go

    			funcs[fn] = nowritebarrierrecCall{}
    			q.PushRight(fn.Nname)
    		}
    		// Check go:nowritebarrier functions.
    		if fn.Pragma&ir.Nowritebarrier != 0 && fn.WBPos.IsKnown() {
    			base.ErrorfAt(fn.WBPos, 0, "write barrier prohibited")
    		}
    	}
    
    	// Perform a BFS of the call graph from all
    	// go:nowritebarrierrec functions.
    	enqueue := func(src, target *ir.Func, pos src.XPos) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 15 17:29:46 UTC 2024
    - 5.9K bytes
    - Viewed (0)
Back to top