Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 222 for SLICE (0.54 sec)

  1. src/go/types/subst.go

    		}
    
    	case *Array:
    		elem := subst.typOrNil(t.elem)
    		if elem != t.elem {
    			return &Array{len: t.len, elem: elem}
    		}
    
    	case *Slice:
    		elem := subst.typOrNil(t.elem)
    		if elem != t.elem {
    			return &Slice{elem: elem}
    		}
    
    	case *Struct:
    		if fields, copied := subst.varList(t.fields); copied {
    			s := &Struct{fields: fields, tags: t.tags}
    			s.markComplete()
    			return s
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 03:04:07 UTC 2024
    - 11.1K bytes
    - Viewed (0)
  2. src/internal/types/testdata/check/builtins0.go

    }
    
    func Slice1() {
    	var x int
    	unsafe.Slice()        // ERROR "not enough arguments"
    	unsafe.Slice(1, 2, 3) // ERROR "too many arguments"
    	unsafe.Slice(1 /* ERROR "is not a pointer" */ , 2)
    	unsafe.Slice(nil /* ERROR "nil is not a pointer" */ , 0)
    	unsafe.Slice(&x, "foo" /* ERRORx `cannot convert .* to type int` */ )
    	unsafe.Slice(&x, 1.2 /* ERROR "truncated to int" */ )
    	unsafe.Slice(&x, - /* ERROR "must not be negative" */ 1)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 29.3K bytes
    - Viewed (0)
  3. src/cmd/compile/internal/types2/subst.go

    		}
    
    	case *Array:
    		elem := subst.typOrNil(t.elem)
    		if elem != t.elem {
    			return &Array{len: t.len, elem: elem}
    		}
    
    	case *Slice:
    		elem := subst.typOrNil(t.elem)
    		if elem != t.elem {
    			return &Slice{elem: elem}
    		}
    
    	case *Struct:
    		if fields, copied := subst.varList(t.fields); copied {
    			s := &Struct{fields: fields, tags: t.tags}
    			s.markComplete()
    			return s
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 03:04:07 UTC 2024
    - 11K bytes
    - Viewed (0)
  4. src/cmd/compile/internal/types2/builtins.go

    		}
    
    	case _SliceData:
    		// unsafe.SliceData(slice []T) *T
    		check.verifyVersionf(call.Fun, go1_20, "unsafe.SliceData")
    
    		slice, _ := coreType(x.typ).(*Slice)
    		if slice == nil {
    			check.errorf(x, InvalidUnsafeSliceData, invalidArg+"%s is not a slice", x)
    			return
    		}
    
    		x.mode = value
    		x.typ = NewPointer(slice.elem)
    		if check.recordTypes() {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 27.1K bytes
    - Viewed (0)
  5. src/cmd/trace/gstate.go

    		panic("non-executing goroutine stopped")
    	}
    	ctx.Slice(traceviewer.SliceEvent{
    		Name:     gs.name(),
    		Ts:       ctx.elapsed(gs.startRunningTime),
    		Dur:      ts.Sub(gs.startRunningTime),
    		Resource: uint64(gs.executing),
    		Stack:    stk,
    	})
    
    	// Flush completed ranges.
    	for _, cr := range gs.completedRanges {
    		ctx.Slice(traceviewer.SliceEvent{
    			Name:     cr.name,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 18:48:18 UTC 2024
    - 11.9K bytes
    - Viewed (0)
  6. src/crypto/tls/key_agreement.go

    	if sigType == signatureEd25519 {
    		var signed []byte
    		for _, slice := range slices {
    			signed = append(signed, slice...)
    		}
    		return signed
    	}
    	if version >= VersionTLS12 {
    		h := hashFunc.New()
    		for _, slice := range slices {
    			h.Write(slice)
    		}
    		digest := h.Sum(nil)
    		return digest
    	}
    	if sigType == signatureECDSA {
    		return sha1Hash(slices)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 14:56:25 UTC 2024
    - 11.8K bytes
    - Viewed (0)
  7. tests/joins_test.go

    	}
    
    	CheckUser(t, user2, user)
    }
    
    func TestJoinsForSlice(t *testing.T) {
    	users := []User{
    		*GetUser("slice-joins-1", Config{Company: true, Manager: true, Account: true}),
    		*GetUser("slice-joins-2", Config{Company: true, Manager: true, Account: true}),
    		*GetUser("slice-joins-3", Config{Company: true, Manager: true, Account: true}),
    	}
    
    	DB.Create(&users)
    
    	var userIDs []uint
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Wed Jun 12 10:52:33 UTC 2024
    - 15K bytes
    - Viewed (0)
  8. scan.go

    		}
    
    		switch reflectValue.Kind() {
    		case reflect.Slice, reflect.Array:
    			var (
    				elem        reflect.Value
    				isArrayKind = reflectValue.Kind() == reflect.Array
    			)
    
    			if !update || reflectValue.Len() == 0 {
    				update = false
    				if isArrayKind {
    					db.Statement.ReflectValue.Set(reflect.Zero(reflectValue.Type()))
    				} else {
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Wed Jun 12 10:57:36 UTC 2024
    - 10K bytes
    - Viewed (0)
  9. src/encoding/json/decode.go

    //   - map[string]interface{}, for JSON objects
    //   - nil for JSON null
    //
    // To unmarshal a JSON array into a slice, Unmarshal resets the slice length
    // to zero and then appends each element to the slice.
    // As a special case, to unmarshal an empty JSON array into a slice,
    // Unmarshal replaces the slice with a new empty slice.
    //
    // To unmarshal a JSON array into a Go array, Unmarshal decodes
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 00:18:55 UTC 2024
    - 35.3K bytes
    - Viewed (0)
  10. src/encoding/binary/binary.go

    // For compound structures, it sums the sizes of the elements. Thus, for instance, for a slice
    // it returns the length of the slice times the element size and does not count the memory
    // occupied by the header. If the type of v is not acceptable, dataSize returns -1.
    func dataSize(v reflect.Value) int {
    	switch v.Kind() {
    	case reflect.Slice, reflect.Array:
    		t := v.Type().Elem()
    		if size, ok := structSize.Load(t); ok {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 17:29:31 UTC 2024
    - 23.4K bytes
    - Viewed (0)
Back to top