- Sort Score
- Result 10 results
- Languages All
Results 1 - 8 of 8 for writefile (0.32 sec)
-
src/os/os_test.go
defer chtmpdir(t)() const f = "append.txt" s := writeFile(t, f, O_CREATE|O_TRUNC|O_RDWR, "new") if s != "new" { t.Fatalf("writeFile: have %q want %q", s, "new") } s = writeFile(t, f, O_APPEND|O_RDWR, "|append") if s != "new|append" { t.Fatalf("writeFile: have %q want %q", s, "new|append") } s = writeFile(t, f, O_CREATE|O_APPEND|O_RDWR, "|append") if s != "new|append|append" {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 83.1K bytes - Viewed (0) -
src/cmd/dist/build.go
os.Setenv("LANG", "C") os.Setenv("LANGUAGE", "en_US.UTF8") os.Unsetenv("GO111MODULE") os.Setenv("GOENV", "off") os.Unsetenv("GOFLAGS") os.Setenv("GOWORK", "off") workdir = xworkdir() if err := os.WriteFile(pathf("%s/go.mod", workdir), []byte("module bootstrap"), 0666); err != nil { fatalf("cannot write stub go.mod: %s", err) } xatexit(rmworkdir) tooldir = pathf("%s/pkg/tool/%s_%s", goroot, gohostos, gohostarch)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 20 18:34:40 UTC 2024 - 54K bytes - Viewed (0) -
src/cmd/link/internal/ld/lib.go
{ .debug_gdb_scripts BLOCK(__section_alignment__) (NOLOAD) : { *(.debug_gdb_scripts) } } INSERT AFTER .debug_types; ` err := os.WriteFile(path, []byte(src), 0666) if err != nil { Errorf(nil, "WriteFile %s failed: %v", name, err) } return path } type machoUpdateFunc func(ctxt *Link, exef *os.File, exem *macho.File, outexe string) error
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue May 21 18:45:27 UTC 2024 - 88.6K bytes - Viewed (0) -
src/net/http/fs_test.go
func testFileServerImplicitLeadingSlash(t *testing.T, mode testMode) { tempDir := t.TempDir() if err := os.WriteFile(filepath.Join(tempDir, "foo.txt"), []byte("Hello world"), 0644); err != nil { t.Fatalf("WriteFile: %v", err) } ts := newClientServerTest(t, mode, StripPrefix("/bar/", FileServer(Dir(tempDir)))).ts get := func(suffix string) string {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 15 23:39:44 UTC 2024 - 49.9K bytes - Viewed (0) -
cmd/erasure-healing_test.go
uuid, _ := uuid2.NewRandom() for _, drive := range fsDirs { dir := path.Join(drive, bucket, object, uuid.String()) err = os.MkdirAll(dir, os.ModePerm) if err != nil { t.Fatal(err) } err = os.WriteFile(pathJoin(dir, "part.1"), []byte("some data"), os.ModePerm) if err != nil { t.Fatal(err) } } // This should remove all the unreferenced parts.
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Mon Jun 10 15:51:27 UTC 2024 - 49K bytes - Viewed (0) -
src/cmd/go/go_test.go
if err != nil { t.Fatal(err) } old := data data = append(data, fmt.Sprintf("var DummyUnusedVar%d bool\n", idx)...) if err := os.WriteFile(name, append(data, '\n'), 0666); err != nil { t.Fatal(err) } tg.sleep() return func() { if err := os.WriteFile(name, old, 0666); err != nil { t.Fatal(err) } } } // Every main package depends on the "runtime".
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 81.1K bytes - Viewed (0) -
src/cmd/go/internal/modload/init.go
// WriteWorkFile cleans and writes out the go.work file to the given path. func WriteWorkFile(path string, wf *modfile.WorkFile) error { wf.SortBlocks() wf.Cleanup() out := modfile.Format(wf.Syntax) return os.WriteFile(path, out, 0666) } // UpdateWorkGoVersion updates the go line in wf to be at least goVers, // reporting whether it changed the file. func UpdateWorkGoVersion(wf *modfile.WorkFile, goVers string) (changed bool) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Jun 06 18:36:30 UTC 2024 - 69.8K bytes - Viewed (0) -
src/cmd/go/internal/test/test.go
// See runtime/unsafepoint_test.go. pmain.Internal.OmitDebug = false } if !cfg.BuildN { // writeTestmain writes _testmain.go, // using the test description gathered in t. if err := os.WriteFile(testDir+"_testmain.go", *pmain.Internal.TestmainGo, 0666); err != nil { return nil, nil, nil, err } } // Set compile objdir to testDir we've already created,
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 16 14:34:32 UTC 2024 - 71.9K bytes - Viewed (0)