Search Options

Results per page
Sort
Preferred Languages
Advance

Results 61 - 70 of 1,938 for panics (1.06 sec)

  1. staging/src/k8s.io/apiserver/pkg/server/signal.go

    // Only one of SetupSignalContext and SetupSignalHandler should be called, and only can
    // be called once.
    func SetupSignalContext() context.Context {
    	close(onlyOneSignalHandler) // panics when called twice
    
    	shutdownHandler = make(chan os.Signal, 2)
    
    	ctx, cancel := context.WithCancel(context.Background())
    	signal.Notify(shutdownHandler, shutdownSignals...)
    	go func() {
    		<-shutdownHandler
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Jul 06 14:30:27 UTC 2020
    - 2K bytes
    - Viewed (0)
  2. src/internal/reflectlite/swapper.go

    // slice.
    //
    // Swapper panics if the provided interface is not a slice.
    func Swapper(slice any) func(i, j int) {
    	v := ValueOf(slice)
    	if v.Kind() != Slice {
    		panic(&ValueError{Method: "Swapper", Kind: v.Kind()})
    	}
    	// Fast path for slices of size 0 and 1. Nothing to swap.
    	switch v.Len() {
    	case 0:
    		return func(i, j int) { panic("reflect: slice index out of range") }
    	case 1:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 04 17:34:30 UTC 2024
    - 2K bytes
    - Viewed (0)
  3. src/text/template/option.go

    // strings, either a simple string or "key=value". There can be at
    // most one equals sign in an option string. If the option string
    // is unrecognized or otherwise invalid, Option panics.
    //
    // Known options:
    //
    // missingkey: Control the behavior during execution if a map is
    // indexed with a key that is not present in the map.
    //
    //	"missingkey=default" or "missingkey=invalid"
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Apr 11 16:34:30 UTC 2022
    - 1.9K bytes
    - Viewed (0)
  4. src/crypto/internal/boring/fipstls/tls.go

    // standard crypto (that is, even when Enabled = false).
    func Force() {
    	required.Store(true)
    }
    
    // Abandon allows non-FIPS-approved settings.
    // If called from a non-test binary, it panics.
    func Abandon() {
    	// Note: Not using boring.UnreachableExceptTests because we want
    	// this test to happen even when boring.Enabled = false.
    	name := runtime_arg0()
    	// Allow _test for Go command, .test for Bazel,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 06 14:00:54 UTC 2024
    - 1.7K bytes
    - Viewed (0)
  5. src/runtime/testdata/testexithooks/testexithooks.go

    	flag.Parse()
    	switch *modeflag {
    	case "simple":
    		testSimple()
    	case "goodexit":
    		testGoodExit()
    	case "badexit":
    		testBadExit()
    	case "panics":
    		testPanics()
    	case "callsexit":
    		testHookCallsExit()
    	case "exit2":
    		testExit2()
    	default:
    		panic("unknown mode")
    	}
    }
    
    func testSimple() {
    	f1 := func() { println("foo") }
    	f2 := func() { println("bar") }
    	exithook.Add(exithook.Hook{F: f1})
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 24 16:41:13 UTC 2024
    - 2.1K bytes
    - Viewed (0)
  6. cmd/kubeadm/test/cmd/util.go

    	t.Fatalf("Unable to find sub command %s", name)
    
    	return nil
    }
    
    // getKubeadmPath returns the contents of the environment variable KUBEADM_PATH
    // or panics if it's empty
    func getKubeadmPath() string {
    	kubeadmPath := os.Getenv("KUBEADM_PATH")
    	if len(kubeadmPath) == 0 {
    		panic("the environment variable KUBEADM_PATH must point to the kubeadm binary path")
    	}
    	return kubeadmPath
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Jan 01 12:47:03 UTC 2024
    - 2.5K bytes
    - Viewed (0)
  7. staging/src/k8s.io/apiserver/pkg/admission/plugin/webhook/testing/authentication_info_resolver.go

    	panicMessage string
    }
    
    func (a *panickingAuthenticationInfoResolver) ClientConfigFor(hostPort string) (*rest.Config, error) {
    	panic(a.panicMessage)
    }
    
    func (a *panickingAuthenticationInfoResolver) ClientConfigForService(serviceName, serviceNamespace string, servicePort int) (*rest.Config, error) {
    	panic(a.panicMessage)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 18 18:49:55 UTC 2022
    - 2.7K bytes
    - Viewed (0)
  8. src/testing/run_example_wasm.go

    	stdout := os.Stdout
    	f := createTempFile(eg.Name)
    	os.Stdout = f
    	finished := false
    	start := time.Now()
    
    	// Clean up in a deferred call so we can recover if the example panics.
    	defer func() {
    		timeSpent := time.Since(start)
    
    		// Restore stdout, get output and remove temporary file.
    		os.Stdout = stdout
    		var buf strings.Builder
    		_, seekErr := f.Seek(0, io.SeekStart)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 11 20:56:32 UTC 2023
    - 1.8K bytes
    - Viewed (0)
  9. src/vendor/golang.org/x/crypto/sha3/sha3.go

    	d.state = spongeSqueezing
    	d.n = d.rate
    	copyOut(d, d.storage[:d.rate])
    }
    
    // Write absorbs more data into the hash's state. It panics if any
    // output has already been read.
    func (d *state) Write(p []byte) (written int, err error) {
    	if d.state != spongeAbsorbing {
    		panic("sha3: Write after Read")
    	}
    	written = len(p)
    
    	for len(p) > 0 {
    		if d.n == 0 && len(p) >= d.rate {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 04 16:19:04 UTC 2024
    - 5.4K bytes
    - Viewed (0)
  10. staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/validation/metrics.go

    func (m *validationMetrics) ObserveRatchetingTime(d time.Duration) {
    	m.RatchetingTime.Observe(d.Seconds())
    }
    
    // Reset resets the metrics. This is meant to be used for testing. Panics
    // if the metrics cannot be re-registered. Returns all the reset metrics
    func (m *validationMetrics) Reset() []metrics.Registerable {
    	m.RatchetingTime = metrics.NewHistogram(m.RatchetingTime.HistogramOpts)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Oct 27 17:57:34 UTC 2023
    - 2K bytes
    - Viewed (0)
Back to top