- Sort Score
- Result 10 results
- Languages All
Results 91 - 100 of 447 for writeFiles (0.25 sec)
-
src/cmd/go/go_windows_test.go
defer tg.cleanup() tg.parallel() tmp, err := os.MkdirTemp("", "TestAbsolutePath") if err != nil { t.Fatal(err) } defer robustio.RemoveAll(tmp) file := filepath.Join(tmp, "a.go") err = os.WriteFile(file, []byte{}, 0644) if err != nil { t.Fatal(err) } dir := filepath.Join(tmp, "dir") err = os.Mkdir(dir, 0777) if err != nil { t.Fatal(err) } noVolume := file[len(filepath.VolumeName(file)):]
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Nov 15 20:21:26 UTC 2022 - 1K bytes - Viewed (0) -
test/fixedbugs/issue22660.go
path := filepath.Join("users", "xxx", "go") var src bytes.Buffer fmt.Fprintf(&src, "//line %s:1\n", filepath.Join(path, "foo.go")) if err := ioutil.WriteFile(f.Name(), src.Bytes(), 0660); err != nil { log.Fatal(err) } out, err := exec.Command("go", "tool", "compile", "-p=p", fmt.Sprintf("-trimpath=%s", path), f.Name()).CombinedOutput() if err == nil {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 19 23:33:25 UTC 2023 - 1K bytes - Viewed (0) -
src/cmd/go/testdata/script/test_fuzz_dup_cache.txt
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Mar 16 16:53:11 UTC 2023 - 1K bytes - Viewed (0) -
src/cmd/compile/internal/test/clobberdead_test.go
// takes a while. t.Skip("skip in short mode") } testenv.MustHaveGoRun(t) t.Parallel() tmpdir := t.TempDir() src := filepath.Join(tmpdir, "x.go") err := os.WriteFile(src, []byte(helloSrc), 0644) if err != nil { t.Fatalf("write file failed: %v", err) } cmd := testenv.Command(t, testenv.GoToolPath(t), "run", "-gcflags=all="+flag, src) out, err := cmd.CombinedOutput()
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Nov 15 20:19:15 UTC 2022 - 1.2K bytes - Viewed (0) -
src/cmd/gofmt/gofmt_test.go
if in != out { if err := os.WriteFile(out, got, 0666); err != nil { t.Error(err) } return } // in == out: don't accidentally destroy input t.Errorf("WARNING: -update did not rewrite input file %s", in) } t.Errorf("(gofmt %s) != %s (see %s.gofmt)\n%s", in, out, in, diff.Diff("expected", expected, "got", got)) if err := os.WriteFile(in+".gofmt", got, 0666); err != nil {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue May 10 19:22:49 UTC 2022 - 4.3K bytes - Viewed (0) -
src/cmd/go/testdata/script/cgo_long_cmd.txt
buf.WriteString("// #cgo LDFLAGS:") for i := range 10000 { fmt.Fprintf(&buf, " -Wl,-rpath,/nonexistentpath/%d", i) } buf.WriteString("\n") buf.WriteString(`import "C"`+"\n") if err := os.WriteFile("generated.go", buf.Bytes(), 0o644); err != nil { log.Fatal(err) } } -- gen.go -- package p
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 13 17:12:16 UTC 2024 - 782 bytes - Viewed (0) -
src/debug/buildinfo/buildinfo_test.go
gomodPath := filepath.Join(dir, "go.mod") gomodData := []byte("module example.com/m\ngo 1.18\n") if err := os.WriteFile(gomodPath, gomodData, 0666); err != nil { t.Fatal(err) } helloPath := filepath.Join(dir, "hello.go") helloData := []byte("package main\nfunc main() {}\n") if err := os.WriteFile(helloPath, helloData, 0666); err != nil { t.Fatal(err) } outPath := filepath.Join(dir, path.Base(t.Name()))
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Sep 22 16:22:42 UTC 2023 - 11.2K bytes - Viewed (0) -
src/cmd/go/internal/vcweb/fossil.go
} name := filepath.Base(dir) db := filepath.Join(dir, name+".fossil") cgiPath := db + ".cgi" cgiScript := fmt.Sprintf("#!%s\nrepository: %s\n", h.fossilPath, db) if err := os.WriteFile(cgiPath, []byte(cgiScript), 0755); err != nil { return nil, err } handler := http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { if _, err := os.Stat(db); err != nil {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Apr 21 17:47:26 UTC 2023 - 1.3K bytes - Viewed (0) -
src/text/template/link_test.go
func (t *T) Unused() { println("THIS SHOULD BE ELIMINATED") } func (t *T) Used() {} var sink *T func main() { var t T sink = &t t.Used() } ` td := t.TempDir() if err := os.WriteFile(filepath.Join(td, "x.go"), []byte(prog), 0644); err != nil { t.Fatal(err) } cmd := exec.Command(testenv.GoToolPath(t), "build", "-o", "x.exe", "x.go") cmd.Dir = td if out, err := cmd.CombinedOutput(); err != nil {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Apr 12 21:58:25 UTC 2021 - 1.2K bytes - Viewed (0) -
src/cmd/internal/obj/arm64/asm_arm64_test.go
} defer os.RemoveAll(dir) // generate a very large function buf := bytes.NewBuffer(make([]byte, 0, 7000000)) gen(buf) tmpfile := filepath.Join(dir, "x.s") err = os.WriteFile(tmpfile, buf.Bytes(), 0644) if err != nil { t.Fatalf("can't write output: %v\n", err) } pattern := `0x0080\s00128\s\(.*\)\tMOVD\t\$3,\sR3` // assemble generated file
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Aug 22 02:46:11 UTC 2023 - 7.8K bytes - Viewed (0)