- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 11 for printError (0.36 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) -
operator/pkg/validate/common.go
valStr := fmt.Sprint(val) if len(r.FindString(valStr)) != len(valStr) { errs = util.AppendErr(errs, fmt.Errorf("invalid value %s: %v", path, val)) printError(errs.ToError()) } return errs } // validateStringList returns a validator function that works on a string list, using the supplied ValidatorFunc vf on // each element.
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Thu Aug 10 15:35:03 UTC 2023 - 11K 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) -
src/go/scanner/scanner_test.go
t.Errorf("found %d raw errors, expected 9", len(list)) PrintError(os.Stderr, list) } list.Sort() if len(list) != 9 { t.Errorf("found %d sorted errors, expected 9", len(list)) PrintError(os.Stderr, list) } list.RemoveMultiples() if len(list) != 4 { t.Errorf("found %d one-per-line errors, expected 4", len(list)) PrintError(os.Stderr, list) } } type errorCollector struct {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Aug 28 15:38:31 UTC 2023 - 34.6K bytes - Viewed (0) -
src/cmd/gofmt/gofmt.go
// changing its exit code to a nonzero value. func (r *reporter) Report(err error) { if err == nil { panic("Report with nil error") } st := r.getState() scanner.PrintError(st.err, err) st.exitCode = 2 } func (r *reporter) ExitCode() int { return r.getState().exitCode } // If info == nil, we are formatting stdin instead of a file.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue May 14 19:41:17 UTC 2024 - 15.1K bytes - Viewed (0) -
maven-compat/src/test/java/org/apache/maven/artifact/resolver/ArtifactResolverTest.java
set, projectArtifact, remoteRepositories(), localRepository(), mds); printErrors(result); i = result.getArtifacts().iterator(); assertEquals(m, i.next(), "m should be first"); assertEquals(n, i.next(), "n should be second"); } private void printErrors(ArtifactResolutionResult result) { if (result.hasMissingArtifacts()) {
Registered: Wed Jun 12 09:55:16 UTC 2024 - Last Modified: Thu Apr 25 05:46:50 UTC 2024 - 10.1K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/tools/internal/stdlib/manifest.go
{"(ErrorList).Swap", Method, 0}, {"Error", Type, 0}, {"Error.Msg", Field, 0}, {"Error.Pos", Field, 0}, {"ErrorHandler", Type, 0}, {"ErrorList", Type, 0}, {"Mode", Type, 0}, {"PrintError", Func, 0}, {"ScanComments", Const, 0}, {"Scanner", Type, 0}, {"Scanner.ErrorCount", Field, 0}, }, "go/token": { {"(*File).AddLine", Method, 0}, {"(*File).AddLineColumnInfo", Method, 11},
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Apr 02 02:20:05 UTC 2024 - 534.2K bytes - Viewed (0) -
src/internal/trace/traceviewer/static/trace_viewer_full.html
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Nov 21 20:45:06 UTC 2023 - 2.5M bytes - Viewed (0) -
api/go1.txt
pkg go/printer, type Config struct, Mode Mode pkg go/printer, type Config struct, Tabwidth int pkg go/printer, type Mode uint pkg go/scanner, const ScanComments Mode pkg go/scanner, func PrintError(io.Writer, error) pkg go/scanner, method (*ErrorList) Add(token.Position, string) pkg go/scanner, method (*ErrorList) RemoveMultiples() pkg go/scanner, method (*ErrorList) Reset()
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Aug 14 18:58:28 UTC 2013 - 1.7M bytes - Viewed (0)