- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 59 for Panicf (0.25 sec)
-
src/cmd/api/main_test.go
} func (w *Walker) emitf(format string, args ...any) { f := strings.Join(w.scope, ", ") + ", " + fmt.Sprintf(format, args...) if strings.Contains(f, "\n") { panic("feature contains newlines: " + f) } if _, dup := w.features[f]; dup { panic("duplicate feature inserted: " + f) } w.features[f] = true if verbose { log.Printf("feature: %s", f) } }
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Wed Sep 04 18:16:59 UTC 2024 - 31.4K 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/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) -
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) -
internal/event/config_test.go
</QueueConfiguration>`) queue3 := &Queue{} if err := xml.Unmarshal(data, queue3); err != nil { panic(err) } targetList1 := NewTargetList(context.Background()) targetList2 := NewTargetList(context.Background()) if err := targetList2.Add(&ExampleTarget{TargetID{"1", "webhook"}, false, false}); err != nil { panic(err) } testCases := []struct { queue *Queue region string
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Dec 05 10:16:33 UTC 2023 - 29K bytes - Viewed (0) -
src/bufio/bufio.go
if b.r > 0 { copy(b.buf, b.buf[b.r:b.w]) b.w -= b.r b.r = 0 } if b.w >= len(b.buf) { panic("bufio: tried to fill full buffer") } // Read new data: try a limited number of times. for i := maxConsecutiveEmptyReads; i > 0; i-- { n, err := b.rd.Read(b.buf[b.w:]) if n < 0 { panic(errNegativeRead) } b.w += n if err != nil { b.err = err return } if n > 0 {
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Thu Oct 12 14:39:08 UTC 2023 - 21.8K bytes - Viewed (0) -
cmd/postpolicyform.go
const ( policyCondEqual = "eq" policyCondStartsWith = "starts-with" policyCondContentLength = "content-length-range" ) // toString - Safely convert interface to string without causing panic. func toString(val interface{}) string { switch v := val.(type) { case string: return v default: return "" } } // toLowerString - safely convert interface to lower string
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Sep 23 19:35:41 UTC 2024 - 12.4K bytes - Viewed (0) -
docs/ru/docs/alternatives.md
Нужна мощная система внедрения зависимостей. Необходим способ для уменьшения повторов кода. /// ### <a href="https://sanic.readthedocs.io/en/latest/" class="external-link" target="_blank">Sanic</a> Sanic был одним из первых чрезвычайно быстрых Python-фреймворков основанных на `asyncio`. Он был сделан очень похожим на Flask. /// note | "Технические детали"
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 20 19:20:23 UTC 2024 - 39.3K 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)