Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 91 for panic (0.17 sec)

  1. cni/pkg/nodeagent/ztunnelserver_test.go

    	ztun, err := newZtunnelServer(addr, pods)
    	if err != nil {
    		panic(err)
    	}
    	go ztun.Run(ctx)
    
    	// now as a client connect confirm we and get snapshot
    	resolvedAddr, err := net.ResolveUnixAddr("unixpacket", addr)
    	if err != nil {
    		panic(err)
    	}
    	ztunClient, err := net.DialUnix("unixpacket", nil, resolvedAddr)
    	if err != nil {
    		panic(err)
    	}
    
    	// send hello
    	sendHello(ztunClient)
    
    Go
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Fri Apr 12 21:47:31 GMT 2024
    - 8.6K bytes
    - Viewed (0)
  2. internal/event/targetlist_test.go

    		panic(err)
    	}
    
    	targetListCase3 := NewTargetList(context.Background())
    	if err := targetListCase3.Add(&ExampleTarget{TargetID{"3", "testcase"}, false, false}); err != nil {
    		panic(err)
    	}
    	if err := targetListCase3.Add(&ExampleTarget{TargetID{"1", "webhook"}, false, false}); err != nil {
    		panic(err)
    	}
    
    	testCases := []struct {
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Tue Dec 05 10:16:33 GMT 2023
    - 6.1K bytes
    - Viewed (0)
  3. cmd/metrics-v3-types.go

    		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 {
    			panic(fmt.Sprintf("invalid label: %s (metric: %s)", labels[i], name))
    		}
    		labelMap[labels[i]] = labels[i+1]
    	}
    
    	if len(labels)/2 != len(validLabels) {
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Sun Mar 10 09:15:15 GMT 2024
    - 14.6K bytes
    - Viewed (0)
  4. 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
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Thu Apr 11 20:22:45 GMT 2024
    - 12.7K bytes
    - Viewed (0)
  5. 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
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Tue Dec 05 10:16:33 GMT 2023
    - 29K bytes
    - Viewed (0)
  6. 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)
    	}
    }
    
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Tue Apr 09 20:48:51 GMT 2024
    - 31.4K bytes
    - Viewed (0)
  7. internal/bpool/bpool.go

    // byte arrays sized based on width.
    func NewBytePoolCap(maxSize uint64, width int, capwidth int) (bp *BytePoolCap) {
    	if capwidth > 0 && capwidth < 64 {
    		panic("buffer capped with smaller than 64 bytes is not supported")
    	}
    	if capwidth > 0 && width > capwidth {
    		panic("buffer length cannot be > capacity of the buffer")
    	}
    	return &BytePoolCap{
    		c:    make(chan []byte, maxSize),
    		w:    width,
    		wcap: capwidth,
    	}
    }
    
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Fri Apr 19 16:44:59 GMT 2024
    - 2.6K bytes
    - Viewed (0)
  8. 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
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Fri Apr 26 13:31:36 GMT 2024
    - 18.6K bytes
    - Viewed (0)
  9. internal/logger/console.go

    	}
    	logJSON, err := json.Marshal(&log.Entry{
    		Level:   FatalKind,
    		Message: message,
    		Time:    time.Now().UTC(),
    		Trace:   &log.Trace{Message: message, Source: []string{getSource(6)}},
    	})
    	if err != nil {
    		panic(err)
    	}
    	fmt.Println(string(logJSON))
    
    	ExitFunc(1)
    }
    
    func (f fatalMsg) quiet(msg string, args ...interface{}) {
    	f.pretty(msg, args...)
    }
    
    var (
    	logTag      = "ERROR"
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Fri Feb 02 00:13:57 GMT 2024
    - 5.7K bytes
    - Viewed (0)
  10. 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
    Plain Text
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Tue Apr 16 17:29:58 GMT 2024
    - 13.5K bytes
    - Viewed (0)
Back to top