- Sort Score
- Result 10 results
- Languages All
Results 1 - 7 of 7 for readFile (0.8 sec)
-
src/cmd/dist/build.go
errprintf("cp %s %s\n", src, dst) } writefile(readfile(src), dst, flag) } // dopack copies the package src to dst, // appending the files listed in extra. // The archive format is the traditional Unix ar format. func dopack(dst, src string, extra []string) { bdst := bytes.NewBufferString(readfile(src)) for _, file := range extra { b := readfile(file) // find last path element for archive member name
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/go/internal/modload/init.go
} } // Look for Godeps.json declaring import path. data, _ := os.ReadFile(filepath.Join(dir, "Godeps/Godeps.json")) var cfg1 struct{ ImportPath string } json.Unmarshal(data, &cfg1) if cfg1.ImportPath != "" { return cfg1.ImportPath, nil } // Look for vendor.json declaring import path. data, _ = os.ReadFile(filepath.Join(dir, "vendor/vendor.json")) var cfg2 struct{ RootPath string }
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/go_test.go
if err != nil { return err } dest := filepath.Join("goroot", copydir, srcrel) if _, err := os.Stat(dest); err == nil { return nil } data, err := os.ReadFile(path) if err != nil { return err } tg.tempFile(dest, string(data)) if strings.Contains(copydir, filepath.Join("pkg", "tool")) { os.Chmod(tg.path(dest), 0777) } return nil
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/test/test.go
func (c *runCache) saveOutput(a *work.Action) { if c.id1 == (cache.ActionID{}) && c.id2 == (cache.ActionID{}) { return } // See comment about two-level lookup in tryCacheWithID above. testlog, err := os.ReadFile(a.Objdir + "testlog.txt") if err != nil || !bytes.HasPrefix(testlog, testlogMagic) || testlog[len(testlog)-1] != '\n' { if cache.DebugTest { if err != nil {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 16 14:34:32 UTC 2024 - 71.9K bytes - Viewed (0) -
src/bufio/bufio_test.go
} line, isPrefix, err := l.ReadLine() if err != io.EOF { t.Errorf("expected EOF from ReadLine, got '%s' %t %s", line, isPrefix, err) } } func TestReadLineNonNilLineOrError(t *testing.T) { r := NewReader(strings.NewReader("line 1\n")) for i := 0; i < 2; i++ { l, _, err := r.ReadLine() if l != nil && err != nil {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Feb 10 18:56:01 UTC 2023 - 51.5K bytes - Viewed (0) -
src/cmd/dist/test.go
names, err := d.Readdirnames(-1) if err != nil { return true // conservatively } for _, name := range names { if !strings.HasSuffix(name, "_test.go") { continue } slurp, err := os.ReadFile(filepath.Join(pkgDir, name)) if err != nil { return true // conservatively } if bytes.Contains(slurp, funcBenchmark) { return true } } return false }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 20 16:01:35 UTC 2024 - 50K bytes - Viewed (0) -
src/cmd/compile/internal/syntax/parser.go
// Consider "got X, expected Y" in this case. p.errorAt(pos, "syntax error: unexpected "+tok+msg) } // tokstring returns the English word for selected punctuation tokens // for more readable error messages. Use tokstring (not tok.String()) // for user-facing (error) messages; use tok.String() for debugging // output. func tokstring(tok token) string { switch tok { case _Comma: return "comma"
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 30 19:19:55 UTC 2024 - 62.9K bytes - Viewed (0)