- Sort Score
- Result 10 results
- Languages All
Results 91 - 100 of 560 for writefile (0.18 sec)
-
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/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/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) -
internal/mountinfo/mountinfo_linux_test.go
/dev/2 /path/to/1/2 type2 flags,1,2=3 2 2 /dev/3 /path/to/1.1 type3 flags,1,2=3 3 3 ` var err error dir := t.TempDir() mountsPath := filepath.Join(dir, "mounts") if err = os.WriteFile(mountsPath, []byte(successCase), 0o666); err != nil { t.Fatal(err) } // Failure case where we detected successfully cross device mounts. { absPaths := []string{"/path/to/1"}
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Thu Jan 18 07:03:17 UTC 2024 - 7.3K bytes - Viewed (0) -
test/fixedbugs/issue16037_run.go
} dir, err := ioutil.TempDir("", "issue16037-") if err != nil { log.Fatal(err) } defer os.RemoveAll(dir) path := filepath.Join(dir, "ridiculous_number_of_fields.go") if err := ioutil.WriteFile(path, buf.Bytes(), 0664); err != nil { log.Fatal(err) } out, err := exec.Command("go", "build", "-o="+filepath.Join(dir, "out"), path).CombinedOutput() if err != nil { log.Fatalf("build failed: %v\n%s", err, out)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 19 23:33:25 UTC 2023 - 1.3K bytes - Viewed (0) -
test/fixedbugs/issue11771.go
var buf bytes.Buffer fmt.Fprintln(&buf, ` package main func main() { } `) fmt.Fprintln(&buf, "//go:nowritebarrier\r") fmt.Fprintln(&buf, ` func x() { } `) if err := ioutil.WriteFile(filepath.Join(dir, "x.go"), buf.Bytes(), 0666); err != nil { log.Fatal(err) } cmd := exec.Command("go", "tool", "compile", "-p=p", "x.go") cmd.Dir = dir output, err := cmd.CombinedOutput() if err == nil {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 19 23:33:25 UTC 2023 - 1.3K bytes - Viewed (0) -
test/fixedbugs/issue33555.go
} fmt.Fprintf(&buf, fnlast, count) dir, err := ioutil.TempDir("", "issue33555") if err != nil { return err } defer os.RemoveAll(dir) fn := filepath.Join(dir, "x.go") if err := ioutil.WriteFile(fn, buf.Bytes(), 0644); err != nil { return err } out, err := exec.Command("go", "run", fn).CombinedOutput() if err != nil { return err } want := strconv.Itoa(count + 1)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 19 23:33:25 UTC 2023 - 1.3K bytes - Viewed (0) -
src/cmd/gofmt/gofmt_unix_test.go
t.Skip("skipping permission test when running as root") } dir := t.TempDir() fn := filepath.Join(dir, "perm.go") // Create a file that needs formatting without write permission. if err := os.WriteFile(filepath.Join(fn), []byte(" package main"), 0o400); err != nil { t.Fatal(err) } // Set mtime of the file in the past. past := time.Now().Add(-time.Hour) if err := os.Chtimes(fn, past, past); err != nil {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 18 12:52:14 UTC 2023 - 1.4K bytes - Viewed (0) -
platforms/core-configuration/kotlin-dsl/src/main/kotlin/org/gradle/kotlin/dsl/accessors/Stage1BlocksAccessorClassPath.kt
import org.gradle.internal.snapshot.ValueSnapshot import org.gradle.kotlin.dsl.* import org.gradle.kotlin.dsl.cache.KotlinDslWorkspaceProvider import org.gradle.kotlin.dsl.concurrent.IO import org.gradle.kotlin.dsl.concurrent.writeFile import org.gradle.kotlin.dsl.support.bytecode.InternalName import org.gradle.kotlin.dsl.support.bytecode.newClassTypeOf import java.io.File import javax.inject.Inject /**
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Thu Nov 23 18:58:57 UTC 2023 - 8K bytes - Viewed (0)