Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 207 for elem2 (0.04 sec)

  1. schema/field.go

    					}
    
    					fieldValue.Elem().Set(reflectV.Convert(fieldType))
    					return
    				}
    			}
    
    			if reflectV.Kind() == reflect.Ptr {
    				if reflectV.IsNil() {
    					field.ReflectValueOf(ctx, value).Set(reflect.New(field.FieldType).Elem())
    				} else if reflectV.Type().Elem().AssignableTo(field.FieldType) {
    					field.ReflectValueOf(ctx, value).Set(reflectV.Elem())
    					return
    				} else {
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Mon Apr 15 03:20:20 UTC 2024
    - 32K bytes
    - Viewed (0)
  2. src/encoding/gob/type.go

    	return s
    }
    
    func (s *sliceType) init(elem gobType) {
    	// Set our type id before evaluating the element's, in case it's our own.
    	setTypeId(s)
    	// See the comments about ids in newTypeObject. Only slices and
    	// structs have mutual recursion.
    	if elem.id() == 0 {
    		setTypeId(elem)
    	}
    	s.Elem = elem.id()
    }
    
    func (s *sliceType) safeString(seen map[typeId]bool) string {
    	if seen[s.Id] {
    		return s.Name
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 16 02:00:26 UTC 2024
    - 27.2K bytes
    - Viewed (0)
  3. src/runtime/chan.go

    	return makechan(t, int(size))
    }
    
    func makechan(t *chantype, size int) *hchan {
    	elem := t.Elem
    
    	// compiler checks this but be safe.
    	if elem.Size_ >= 1<<16 {
    		throw("makechan: invalid channel element type")
    	}
    	if hchanSize%maxAlign != 0 || elem.Align_ > maxAlign {
    		throw("makechan: bad alignment")
    	}
    
    	mem, overflow := math.MulUintptr(elem.Size_, uintptr(size))
    	if overflow || mem > maxAlloc-hchanSize || size < 0 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:16:50 UTC 2024
    - 25.9K bytes
    - Viewed (0)
  4. src/runtime/checkptr.go

    import "unsafe"
    
    func checkptrAlignment(p unsafe.Pointer, elem *_type, n uintptr) {
    	// nil pointer is always suitably aligned (#47430).
    	if p == nil {
    		return
    	}
    
    	// Check that (*[n]elem)(p) is appropriately aligned.
    	// Note that we allow unaligned pointers if the types they point to contain
    	// no pointers themselves. See issue 37298.
    	// TODO(mdempsky): What about fieldAlign?
    	if elem.Pointers() && uintptr(p)&(uintptr(elem.Align_)-1) != 0 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 00:18:55 UTC 2024
    - 3.6K bytes
    - Viewed (0)
  5. src/path/filepath/path_plan9.go

    	return strings.Split(path, string(ListSeparator))
    }
    
    func abs(path string) (string, error) {
    	return unixAbs(path)
    }
    
    func join(elem []string) string {
    	// If there's a bug here, fix the logic in ./path_unix.go too.
    	for i, e := range elem {
    		if e != "" {
    			return Clean(strings.Join(elem[i:], string(Separator)))
    		}
    	}
    	return ""
    }
    
    func sameWord(a, b string) bool {
    	return a == b
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 26 23:07:50 UTC 2024
    - 926 bytes
    - Viewed (0)
  6. src/encoding/gob/encode.go

    		return
    	}
    	for i := 0; i < length; i++ {
    		elem := value.Index(i)
    		if elemIndir > 0 {
    			elem = encIndirect(elem, elemIndir)
    			// TODO: Is elem guaranteed valid? If so we could avoid this check.
    			if !valid(elem) {
    				errorf("encodeArray: nil element")
    			}
    		}
    		op(nil, state, elem)
    	}
    }
    
    // encodeReflectValue is a helper for maps. It encodes the value v.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 16 02:00:26 UTC 2024
    - 19K bytes
    - Viewed (0)
  7. src/cmd/vendor/golang.org/x/tools/go/analysis/passes/buildtag/buildtag_old.go

    }
    
    func checkArguments(fields []string) error {
    	for _, arg := range fields[1:] {
    		for _, elem := range strings.Split(arg, ",") {
    			if strings.HasPrefix(elem, "!!") {
    				return fmt.Errorf("invalid double negative in build constraint: %s", arg)
    			}
    			elem = strings.TrimPrefix(elem, "!")
    			for _, c := range elem {
    				if !unicode.IsLetter(c) && !unicode.IsDigit(c) && c != '_' && c != '.' {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 03 02:38:00 UTC 2024
    - 4.3K bytes
    - Viewed (0)
  8. src/cmd/compile/internal/types2/resolver.go

    	// Note that this uses / always, even on Windows, because Go import
    	// paths always use forward slashes.
    	path := obj.imported.path
    	elem := path
    	if i := strings.LastIndex(elem, "/"); i >= 0 {
    		elem = elem[i+1:]
    	}
    	if obj.name == "" || obj.name == "." || obj.name == elem {
    		check.softErrorf(obj, UnusedImport, "%q imported and not used", path)
    	} else {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 18 14:10:44 UTC 2024
    - 26.3K bytes
    - Viewed (0)
  9. src/go/types/resolver.go

    	// Note that this uses / always, even on Windows, because Go import
    	// paths always use forward slashes.
    	path := obj.imported.path
    	elem := path
    	if i := strings.LastIndex(elem, "/"); i >= 0 {
    		elem = elem[i+1:]
    	}
    	if obj.name == "" || obj.name == "." || obj.name == elem {
    		check.softErrorf(obj, UnusedImport, "%q imported and not used", path)
    	} else {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 16:22:59 UTC 2024
    - 26.1K bytes
    - Viewed (0)
  10. src/reflect/all_test.go

    	isValid(m.Func)
    	isNonNil(v.Elem().Field(0).Interface())
    	isNonNil(v.Elem().Field(1).Interface())
    	isNonNil(v.Elem().Field(2).Field(2).Index(0))
    	isNonNil(v.Elem().FieldByName("X").Interface())
    	isNonNil(v.Elem().FieldByName("Y").Interface())
    	isNonNil(v.Elem().FieldByName("Z").Interface())
    	isNonNil(v.Elem().FieldByName("S").Index(0).Interface())
    	isNonNil(v.Type().Method(0).Func.Interface())
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 218.8K bytes
    - Viewed (0)
Back to top