Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 1,938 for panics (0.16 sec)

  1. src/sort/slice.go

    // license that can be found in the LICENSE file.
    
    package sort
    
    import (
    	"internal/reflectlite"
    	"math/bits"
    )
    
    // Slice sorts the slice x given the provided less function.
    // It panics if x is not a slice.
    //
    // The sort is not guaranteed to be stable: equal elements
    // may be reversed from their original order.
    // For a stable sort, use [SliceStable].
    //
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Nov 28 16:40:32 UTC 2023
    - 1.8K bytes
    - Viewed (0)
  2. pkg/config/schema/codegen/templates/gvk.go.tmpl

    {{- end }}
    	}
    
    	return schema.GroupVersionResource{}, false
    }
    
    // MustToGVR converts a GVK to a GVR, and panics if it cannot be converted
    // Warning: this is only safe for known types; do not call on arbitrary GVKs
    func MustToGVR(g config.GroupVersionKind) schema.GroupVersionResource {
    	r, ok := ToGVR(g)
    	if !ok {
    		panic("unknown kind: " + g.String())
    	}
    	return r
    }
    
    // FromGVR converts a GVR to a GVK.
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Dec 04 03:54:51 UTC 2023
    - 2K bytes
    - Viewed (0)
  3. pkg/test/framework/components/echo/config/source.go

    	// MustTemplate calls Template and panics if an error occurs.
    	MustTemplate() *param.Template
    
    	// YAML reads the yaml from this Source. If this source contains parameters,
    	// it is evaluated as a template.
    	YAML() (string, error)
    
    	// YAMLOrFail calls GetYAML and fails if an error occurs.
    	YAMLOrFail(t test.Failer) string
    
    	// MustYAML calls GetYAML and panics if an error occurs.
    	MustYAML() string
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Jul 25 19:30:47 UTC 2022
    - 5.2K bytes
    - Viewed (0)
  4. test/fixedbugs/issue15975.go

    func nilInterfaceDeferCall() {
    	var x Closer
    	defer x.Close()
    	// if it panics when evaluating x.Close, it should not reach here
    	fail = true
    }
    
    func shouldPanic(f func()) {
    	defer func() {
    		if recover() == nil {
    			panic("did not panic")
    		}
    	}()
    	f()
    }
    
    func main() {
    	shouldPanic(nilInterfaceDeferCall)
    	if fail {
    		panic("fail")
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jun 08 20:35:53 UTC 2016
    - 572 bytes
    - Viewed (0)
  5. src/os/exec/internal/fdtest/exists_windows.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    //go:build windows
    
    package fdtest
    
    // Exists is not implemented on windows and panics.
    func Exists(fd uintptr) bool {
    	panic("unimplemented")
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Nov 16 19:41:37 UTC 2021
    - 305 bytes
    - Viewed (0)
  6. src/runtime/race/testdata/sync_test.go

    // corrupt the race detector state.
    // Used to hang indefinitely.
    func TestNoRaceNilMutexCrash(t *testing.T) {
    	var mutex sync.Mutex
    	panics := 0
    	defer func() {
    		if x := recover(); x != nil {
    			mutex.Lock()
    			panics++
    			mutex.Unlock()
    		} else {
    			panic("no panic")
    		}
    	}()
    	var othermutex *sync.RWMutex
    	othermutex.RLock()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Nov 10 15:05:17 UTC 2020
    - 3K bytes
    - Viewed (0)
  7. test/unsafebuiltins.go

    		assert(&s[0] == &p[0])
    		assert(len(s) == len(p))
    		assert(cap(s) == len(p))
    
    		// nil pointer with zero length returns nil
    		assert(unsafe.Slice((*int)(nil), 0) == nil)
    
    		// nil pointer with positive length panics
    		mustPanic(func() { _ = unsafe.Slice((*int)(nil), 1) })
    
    		// negative length
    		var neg int = -1
    		mustPanic(func() { _ = unsafe.Slice(new(byte), neg) })
    
    		// length too large
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Aug 31 17:15:15 UTC 2022
    - 2.3K bytes
    - Viewed (0)
  8. src/crypto/internal/boring/boring.go

    func init() {
    	C._goboringcrypto_BORINGSSL_bcm_power_on_self_test()
    	if C._goboringcrypto_FIPS_mode() != 1 {
    		panic("boringcrypto: not in FIPS mode")
    	}
    	sig.BoringCrypto()
    }
    
    // Unreachable marks code that should be unreachable
    // when BoringCrypto is in use. It panics.
    func Unreachable() {
    	panic("boringcrypto: invalid code execution")
    }
    
    // provided by runtime to avoid os import.
    func runtime_arg0() string
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 06 14:00:54 UTC 2024
    - 3K bytes
    - Viewed (0)
  9. src/internal/reflectlite/export_test.go

    import (
    	"unsafe"
    )
    
    // Field returns the i'th field of the struct v.
    // It panics if v's Kind is not Struct or i is out of range.
    func Field(v Value, i int) Value {
    	if v.kind() != Struct {
    		panic(&ValueError{"reflect.Value.Field", v.kind()})
    	}
    	tt := (*structType)(unsafe.Pointer(v.typ()))
    	if uint(i) >= uint(len(tt.Fields)) {
    		panic("reflect: Field index out of range")
    	}
    	field := &tt.Fields[i]
    	typ := field.Typ
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 07 17:01:54 UTC 2024
    - 3K bytes
    - Viewed (0)
  10. src/sync/atomic/value.go

    // Store sets the value of the [Value] v to val.
    // All calls to Store for a given Value must use values of the same concrete type.
    // Store of an inconsistent type panics, as does Store(nil).
    func (v *Value) Store(val any) {
    	if val == nil {
    		panic("sync/atomic: store of nil value into Value")
    	}
    	vp := (*efaceWords)(unsafe.Pointer(v))
    	vlp := (*efaceWords)(unsafe.Pointer(&val))
    	for {
    		typ := LoadPointer(&vp.typ)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Feb 26 20:48:55 UTC 2024
    - 5.9K bytes
    - Viewed (0)
Back to top