- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 302 for panics (0.12 sec)
-
cmd/bitrot.go
func (a BitrotAlgorithm) Available() bool { _, ok := bitrotAlgorithms[a] return ok } // String returns the string identifier for a given bitrot algorithm. // If the algorithm is not supported String panics. func (a BitrotAlgorithm) String() string { name, ok := bitrotAlgorithms[a] if !ok { logger.CriticalIf(GlobalContext, errors.New("Unsupported bitrot algorithm")) } return name }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Jan 30 20:43:25 UTC 2024 - 7.6K bytes - Viewed (0) -
src/bufio/scan.go
// // Buffer panics if it is called after scanning has started. func (s *Scanner) Buffer(buf []byte, max int) { if s.scanCalled { panic("Buffer called after Scan") } s.buf = buf[0:cap(buf)] s.maxTokenSize = max } // Split sets the split function for the [Scanner]. // The default split function is [ScanLines]. // // Split panics if it is called after scanning has started.
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Mon Oct 23 09:06:30 UTC 2023 - 14.2K bytes - Viewed (0) -
cmd/net.go
} return } // mustGetLocalIP4 returns IPv4 addresses of localhost. It panics on error. func mustGetLocalIP4() (ipList set.StringSet) { ipList = set.NewStringSet() for _, ip := range mustGetLocalIPs() { if ip.To4() != nil { ipList.Add(ip.String()) } } return } // mustGetLocalIP6 returns IPv6 addresses of localhost. It panics on error. func mustGetLocalIP6() (ipList set.StringSet) {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Wed Jun 19 14:34:00 UTC 2024 - 9.6K bytes - Viewed (0) -
.github/ISSUE_TEMPLATE/00-bug.yml
id: actual-behavior attributes: label: "What did you see happen?" description: Command invocations and their associated output, functions with their arguments and return results, full stacktraces for panics (upload a file if it is very long), etc. Prefer copying text output over using screenshots. validations: required: true - type: textarea id: expected-behavior attributes:
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Thu Jan 04 23:31:17 UTC 2024 - 3.3K bytes - Viewed (0) -
cmd/metrics-v3-types.go
// descriptors, this function panics. // // Panics if `labels` is not a list of ordered label name and label value pairs // or if all labels for the metric are not provided. func (m *MetricValues) Set(name MetricName, value float64, labels ...string) { desc, ok := m.descriptors[name] if !ok { panic(fmt.Sprintf("metric has no description: %s", name)) }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Jul 30 22:28:46 UTC 2024 - 15.6K bytes - Viewed (0) -
src/bytes/buffer.go
// another n bytes. After Grow(n), at least n bytes can be written to the // buffer without another allocation. // If n is negative, Grow will panic. // If the buffer can't grow it will panic with [ErrTooLarge]. func (b *Buffer) Grow(n int) { if n < 0 { panic("bytes.Buffer.Grow: negative count") } m := b.grow(n) b.buf = b.buf[:m] } // Write appends the contents of p to the buffer, growing the buffer as
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Tue Oct 29 16:47:05 UTC 2024 - 15.7K bytes - Viewed (0) -
src/bytes/buffer_test.go
} } type panicReader struct{ panic bool } func (r panicReader) Read(p []byte) (int, error) { if r.panic { panic("oops") } return 0, io.EOF } // Make sure that an empty Buffer remains empty when // it is "grown" before a Read that panics func TestReadFromPanicReader(t *testing.T) { // First verify non-panic behaviour var buf Buffer
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Tue Sep 03 20:55:15 UTC 2024 - 18.6K bytes - Viewed (0) -
cmd/generic-handlers.go
if globalLocalNodeName != "" { w.Header().Set(xhttp.AmzRequestHostID, globalLocalNodeNameHex) } h.ServeHTTP(w, r) }) } // criticalErrorHandler handles panics and fatal errors by // `panic(logger.ErrCritical)` as done by `logger.CriticalIf`. // // It should be always the first / highest HTTP handler. func setCriticalErrorHandler(h http.Handler) http.Handler {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Jul 29 18:10:04 UTC 2024 - 20.5K bytes - Viewed (0) -
doc/go1.17_spec.html
</pre> <h3 id="Handling_panics">Handling panics</h3> <p> Two built-in functions, <code>panic</code> and <code>recover</code>, assist in reporting and handling <a href="#Run_time_panics">run-time panics</a> and program-defined error conditions. </p> <pre class="grammar"> func panic(interface{}) func recover() interface{} </pre> <p>
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Thu Oct 10 18:25:45 UTC 2024 - 211.6K bytes - Viewed (0) -
src/cmd/asm/internal/asm/operand_test.go
return NewParser(ctxt, architecture, nil) } // tryParse executes parse func in panicOnError=true context. // parse is expected to call any parsing methods that may panic. // Returns error gathered from recover; nil if no parse errors occurred. // // For unexpected panics, calls t.Fatal. func tryParse(t *testing.T, parse func()) (err error) { panicOnError = true defer func() { panicOnError = false e := recover()
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Tue Aug 29 18:31:05 UTC 2023 - 23.9K bytes - Viewed (0)