Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 8 of 8 for SliceMap (0.33 sec)

  1. src/runtime/runtime-gdb_test.go

    	slicemap := make(map[string][]string,` + strconv.FormatInt(abi.MapBucketCount+3, 10) + `)
        chanint := make(chan int, 10)
        chanstr := make(chan string, 10)
        chanint <- 99
    	chanint <- 11
        chanstr <- "spongepants"
        chanstr <- "squarebob"
    	mapvar["abc"] = "def"
    	mapvar["ghi"] = "jkl"
    	slicemap["a"] = []string{"b","c","d"}
        slicemap["e"] = []string{"f","g","h"}
    	strvar := "abc"
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Feb 21 22:16:54 UTC 2024
    - 23.2K bytes
    - Viewed (0)
  2. tests/create_test.go

    	data := []User{}
    	if err := DB.Create(&data).Error; err != gorm.ErrEmptySlice {
    		t.Errorf("no data should be created, got %v", err)
    	}
    
    	sliceMap := []map[string]interface{}{}
    	if err := DB.Model(&User{}).Create(&sliceMap).Error; err != gorm.ErrEmptySlice {
    		t.Errorf("no data should be created, got %v", err)
    	}
    }
    
    func TestCreateInvalidSlice(t *testing.T) {
    	users := []*User{
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Tue Mar 19 03:50:28 UTC 2024
    - 26.4K bytes
    - Viewed (0)
  3. src/internal/xcoff/file.go

    			return nil, err
    		}
    		f.StringTable = st
    	}
    
    	// Read section headers
    	if _, err := sr.Seek(int64(hdrsz)+int64(opthdr), io.SeekStart); err != nil {
    		return nil, err
    	}
    	c := saferio.SliceCap[*Section](uint64(nscns))
    	if c < 0 {
    		return nil, fmt.Errorf("too many XCOFF sections (%d)", nscns)
    	}
    	f.Sections = make([]*Section, 0, c)
    	for i := 0; i < int(nscns); i++ {
    		var scnptr uint64
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Feb 12 14:42:29 UTC 2024
    - 17.3K bytes
    - Viewed (0)
  4. src/debug/macho/file.go

    	offset := int64(fileHeaderSize32)
    	if f.Magic == Magic64 {
    		offset = fileHeaderSize64
    	}
    	dat, err := saferio.ReadDataAt(r, uint64(f.Cmdsz), offset)
    	if err != nil {
    		return nil, err
    	}
    	c := saferio.SliceCap[Load](uint64(f.Ncmd))
    	if c < 0 {
    		return nil, &FormatError{offset, "too many load commands", nil}
    	}
    	f.Loads = make([]Load, 0, c)
    	bo := f.ByteOrder
    	for i := uint32(0); i < f.Ncmd; i++ {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Oct 18 19:33:30 UTC 2023
    - 17.9K bytes
    - Viewed (0)
  5. src/cmd/compile/internal/ssa/rewritedec.go

    	v_0 := v.Args[0]
    	b := v.Block
    	config := b.Func.Config
    	typ := &b.Func.Config.Types
    	// match: (SliceCap (SliceMake _ _ cap))
    	// result: cap
    	for {
    		if v_0.Op != OpSliceMake {
    			break
    		}
    		cap := v_0.Args[2]
    		v.copyOf(cap)
    		return true
    	}
    	// match: (SliceCap x:(Load <t> ptr mem))
    	// cond: t.IsSlice()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 12 00:48:31 UTC 2023
    - 24.9K bytes
    - Viewed (0)
  6. src/encoding/gob/decode.go

    	}
    	if value.Cap() < n {
    		safe := saferio.SliceCap[byte](uint64(n))
    		if safe < 0 {
    			errorf("%s slice too big: %d elements", value.Type(), n)
    		}
    		value.Set(reflect.MakeSlice(value.Type(), safe, safe))
    		ln := safe
    		i := 0
    		for i < n {
    			if i >= ln {
    				// We didn't allocate the entire slice,
    				// due to using saferio.SliceCap.
    				// Grow the slice for one more element.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Sep 07 19:10:23 UTC 2023
    - 40.1K bytes
    - Viewed (0)
  7. src/cmd/compile/internal/ssa/_gen/genericOps.go

    	{name: "SliceMake", argLength: 3},                // arg0=ptr, arg1=len, arg2=cap
    	{name: "SlicePtr", argLength: 1, typ: "BytePtr"}, // ptr(arg0)
    	{name: "SliceLen", argLength: 1},                 // len(arg0)
    	{name: "SliceCap", argLength: 1},                 // cap(arg0)
    	// SlicePtrUnchecked, like SlicePtr, extracts the pointer from a slice.
    	// SlicePtr values are assumed non-nil, because they are guarded by bounds checks.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 15:49:20 UTC 2024
    - 42.6K bytes
    - Viewed (0)
  8. src/debug/elf/file.go

    			}
    		}
    	}
    
    	if shnum > 0 && shentsize < wantShentsize {
    		return nil, &FormatError{0, "invalid ELF shentsize", shentsize}
    	}
    
    	// Read section headers
    	c := saferio.SliceCap[Section](uint64(shnum))
    	if c < 0 {
    		return nil, &FormatError{0, "too many sections", shnum}
    	}
    	f.Sections = make([]*Section, 0, c)
    	names := make([]uint32, 0, c)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 23 16:49:58 UTC 2024
    - 43.1K bytes
    - Viewed (0)
Back to top