- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 156 for Panic (0.05 sec)
-
cmd/metrics-v3-types.go
desc, ok := m.descriptors[name] if !ok { panic(fmt.Sprintf("metric has no description: %s", name)) } if len(labels)%2 != 0 { panic("labels must be a list of ordered key-value pairs") } validLabels := desc.getLabelSet() labelMap := make(map[string]string, len(labels)/2) for i := 0; i < len(labels); i += 2 { if _, ok := validLabels[labels[i]]; !ok {
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/bufio/export_test.go
// Exported for testing only. import ( "unicode/utf8" ) var IsSpace = isSpace const DefaultBufSize = defaultBufSize func (s *Scanner) MaxTokenSize(n int) { if n < utf8.UTFMax || n > 1e9 { panic("bad max token size") } if n < len(s.buf) { s.buf = make([]byte, n) } s.maxTokenSize = n } // ErrOrEOF is like Err, but returns EOF. Used to test a corner case. func (s *Scanner) ErrOrEOF() error {
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Thu Nov 02 17:17:44 UTC 2017 - 597 bytes - Viewed (0) -
src/builtin/builtin.go
func close(c chan<- Type) // The panic built-in function stops normal execution of the current // goroutine. When a function F calls panic, normal execution of F stops // immediately. Any functions whose execution was deferred by F are run in // the usual way, and then F returns to its caller. To the caller G, the // invocation of F then behaves like a call to panic, terminating G's
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Thu Apr 11 20:22:45 UTC 2024 - 12.7K bytes - Viewed (0) -
internal/s3select/jstream/scanner.go
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Sep 23 19:35:41 UTC 2024 - 2.5K bytes - Viewed (0) -
internal/grid/muxserver.go
if debugPrint { fmt.Println("Mux", m.ID, "Handler took", time.Since(start).Round(time.Millisecond)) } if r := recover(); r != nil { gridLogIf(ctx, fmt.Errorf("grid handler (%v) panic: %v", msg.Handler, r)) err := RemoteErr(fmt.Sprintf("handler panic: %v", r)) handlerErr = &err } if debugPrint { fmt.Println("muxServer: Mux", m.ID, "Returned with", handlerErr) } }()
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Jun 07 15:51:52 UTC 2024 - 9.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) -
doc/godebug.md
The [GODEBUG History](#history) gives the exact defaults for each Go toolchain version. For example, Go 1.21 introduces the `panicnil` setting, controlling whether `panic(nil)` is allowed; it defaults to `panicnil=0`, making `panic(nil)` a run-time error. Using `panicnil=1` restores the behavior of Go 1.20 and earlier. When compiling a work module or workspace that declares
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Mon Oct 28 14:46:33 UTC 2024 - 17.2K bytes - Viewed (0) -
src/archive/zip/register.go
if _, dup := decompressors.LoadOrStore(method, dcomp); dup { panic("decompressor already registered") } } // RegisterCompressor registers custom compressors for a specified method ID. // The common methods [Store] and [Deflate] are built in. func RegisterCompressor(method uint16, comp Compressor) { if _, dup := compressors.LoadOrStore(method, comp); dup { panic("compressor already registered") } }
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Fri Oct 13 18:36:46 UTC 2023 - 3.7K bytes - Viewed (0) -
src/cmd/cgo/ast_go1.go
package main import ( "go/ast" "go/token" ) func (f *File) walkUnexpected(x interface{}, context astContext, visit func(*File, interface{}, astContext)) { error_(token.NoPos, "unexpected type %T in walk", x) panic("unexpected type") } func funcTypeTypeParams(n *ast.FuncType) *ast.FieldList { return nil } func typeSpecTypeParams(n *ast.TypeSpec) *ast.FieldList { return nil
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Wed Nov 30 21:45:10 UTC 2022 - 578 bytes - Viewed (0) -
src/cmd/cgo/ast_go118.go
"go/token" ) func (f *File) walkUnexpected(x interface{}, context astContext, visit func(*File, interface{}, astContext)) { switch n := x.(type) { default: error_(token.NoPos, "unexpected type %T in walk", x) panic("unexpected type") case *ast.IndexListExpr: f.walk(&n.X, ctxExpr, visit) f.walk(n.Indices, ctxExpr, visit) } } func funcTypeTypeParams(n *ast.FuncType) *ast.FieldList { return n.TypeParams }
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Wed Nov 30 21:45:10 UTC 2022 - 730 bytes - Viewed (0)