Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 158 for panic (0.17 sec)

  1. cmd/dynamic-timeouts.go

    	return dt
    }
    
    // newDynamicTimeout returns a new dynamic timeout initialized with timeout value
    func newDynamicTimeout(timeout, minimum time.Duration) *dynamicTimeout {
    	if timeout <= 0 || minimum <= 0 {
    		panic("newDynamicTimeout: negative or zero timeout")
    	}
    	if minimum > timeout {
    		minimum = timeout
    	}
    	return &dynamicTimeout{timeout: int64(timeout), minimum: int64(minimum)}
    }
    
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Fri Aug 19 23:21:05 GMT 2022
    - 4.5K bytes
    - Viewed (0)
  2. internal/crypto/error.go

    )
    
    // errOutOfEntropy indicates that the a source of randomness (PRNG) wasn't able
    // to produce enough random data. This is fatal error and should cause a panic.
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Mar 28 17:44:56 GMT 2024
    - 4.4K bytes
    - Viewed (0)
  3. src/bytes/reader.go

    func (r *Reader) WriteTo(w io.Writer) (n int64, err error) {
    	r.prevRune = -1
    	if r.i >= int64(len(r.s)) {
    		return 0, nil
    	}
    	b := r.s[r.i:]
    	m, err := w.Write(b)
    	if m > len(b) {
    		panic("bytes.Reader.WriteTo: invalid Write count")
    	}
    	r.i += int64(m)
    	n = int64(m)
    	if m != len(b) && err == nil {
    		err = io.ErrShortWrite
    	}
    	return
    }
    
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Fri Oct 13 17:10:31 GMT 2023
    - 3.9K bytes
    - Viewed (0)
  4. src/bytes/bytes.go

    //
    // It panics if count is negative or if the result of (len(b) * count)
    // overflows.
    func Repeat(b []byte, count int) []byte {
    	if count == 0 {
    		return []byte{}
    	}
    
    	// Since we cannot return an error on overflow,
    	// we should panic if the repeat will generate an overflow.
    	// See golang.org/issue/16237.
    	if count < 0 {
    		panic("bytes: negative Repeat count")
    	}
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Mon Feb 19 19:51:15 GMT 2024
    - 33.8K bytes
    - Viewed (0)
  5. src/arena/arena.go

    // allocated from an arena, it is returned untouched. This function is useful
    // to more easily let an arena-allocated value out-live its arena.
    // T must be a pointer, a slice, or a string, otherwise this function will panic.
    func Clone[T any](s T) T {
    	return runtime_arena_heapify(s).(T)
    }
    
    //go:linkname reflect_arena_New reflect.arena_New
    func reflect_arena_New(a *Arena, typ any) any {
    	return runtime_arena_arena_New(a.a, typ)
    }
    
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Wed Oct 12 20:23:36 GMT 2022
    - 4.3K bytes
    - Viewed (0)
  6. cmd/data-usage_test.go

    	}
    }
    
    // equalAsJSON returns whether the values are equal when encoded as JSON.
    func equalAsJSON(a, b interface{}) bool {
    	aj, err := json.Marshal(a)
    	if err != nil {
    		panic(err)
    	}
    	bj, err := json.Marshal(b)
    	if err != nil {
    		panic(err)
    	}
    	return bytes.Equal(aj, bj)
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Wed Mar 27 15:10:40 GMT 2024
    - 14.1K bytes
    - Viewed (0)
  7. cni/pkg/nodeagent/server_test.go

    		select {
    		case <-wg.C():
    			return
    		case <-time.After(time.Second):
    			t.Fatal("Wait group timed out!\n")
    		}
    	}
    }
    
    func (wg *WaitGroup) Add(i int32) {
    	select {
    	case <-wg.done:
    		panic("use of an already closed WaitGroup")
    	default:
    	}
    	atomic.AddInt32(&wg.count, i)
    }
    
    func (wg *WaitGroup) Done() {
    	i := atomic.AddInt32(&wg.count, -1)
    	if i == 0 {
    		close(wg.done)
    	}
    }
    Go
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Fri Jan 26 20:34:28 GMT 2024
    - 7.8K bytes
    - Viewed (0)
  8. internal/grid/connection.go

    	if !strings.HasPrefix(o.local, "https://") && !strings.HasPrefix(o.local, "wss://") {
    		c.baseFlags |= FlagCRCxxh3
    	}
    	if o.publisher != nil {
    		c.traceRequests(o.publisher)
    	}
    	if o.local == o.remote {
    		panic("equal hosts")
    	}
    	if c.shouldConnect() {
    		c.side = ws.StateClientSide
    
    		go func() {
    			if o.blockConnect != nil {
    				<-o.blockConnect
    			}
    			c.connect()
    		}()
    	}
    	if debugPrint {
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 42.6K bytes
    - Viewed (0)
  9. internal/grid/connection_test.go

    			gotCall <- struct{}{}
    			select {
    			case <-ctx.Done():
    				gotCall <- struct{}{}
    			case <-cleanReqs:
    				panic("should not be called")
    			}
    			return nil
    		},
    		OutCapacity: 1,
    		InCapacity:  1,
    	}
    	errFatal(remote.RegisterSingleHandler(handlerTest, h1))
    	errFatal(remote.RegisterStreamingHandler(handlerTest2, h2))
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Tue Nov 21 01:09:35 GMT 2023
    - 6K bytes
    - Viewed (0)
  10. internal/s3select/simdj/record.go

    		dst.KVS = make(jstream.KVS, 0, len(elems.Elements))
    	}
    	for _, elem := range elems.Elements {
    		v, err := sql.IterToValue(elem.Iter)
    		if err != nil {
    			v, err = elem.Iter.Interface()
    			if err != nil {
    				panic(err)
    			}
    		}
    		dst.KVS = append(dst.KVS, jstream.KV{
    			Key:   elem.Name,
    			Value: v,
    		})
    	}
    	return dst, nil
    }
    
    // Set - sets the value for a column name.
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Tue Jun 01 21:59:40 GMT 2021
    - 5.4K bytes
    - Viewed (0)
Back to top