- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for printError (0.45 sec)
-
src/go/scanner/errors.go
func (p ErrorList) Err() error { if len(p) == 0 { return nil } return p } // PrintError is a utility function that prints a list of errors to w, // one error per line, if the err parameter is an [ErrorList]. Otherwise // it prints the err string. func PrintError(w io.Writer, err error) { if list, ok := err.(ErrorList); ok { for _, e := range list { fmt.Fprintf(w, "%s\n", e) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 19 12:02:03 UTC 2023 - 3K bytes - Viewed (0) -
src/cmd/fix/main.go
var gofmtBuf strings.Builder if err := format.Node(&gofmtBuf, fset, n); err != nil { return "<" + err.Error() + ">" } return gofmtBuf.String() } func report(err error) { scanner.PrintError(os.Stderr, err) exitCode = 2 } func walkDir(path string) { filepath.WalkDir(path, visitFile) } func visitFile(path string, f fs.DirEntry, err error) error { if err == nil && isGoFile(f) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue May 14 19:41:17 UTC 2024 - 5.4K bytes - Viewed (0)