- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for printError (0.14 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) -
src/go/types/gotype.go
` func usage() { fmt.Fprintln(os.Stderr, usageString) flag.PrintDefaults() os.Exit(2) } func report(err error) { if *panicOnError { panic(err) } scanner.PrintError(os.Stderr, err) if list, ok := err.(scanner.ErrorList); ok { errorCount += len(list) return } errorCount++ } // parse may be called concurrently.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Nov 18 17:59:44 UTC 2022 - 8.3K bytes - Viewed (0)