Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 17 for StructType (0.14 sec)

  1. src/encoding/gob/type.go

    		str += fmt.Sprintf("%s %s; ", f.Name, f.Id.gobType().safeString(seen))
    	}
    	str += "}"
    	return str
    }
    
    func (s *structType) string() string { return s.safeString(make(map[typeId]bool)) }
    
    func newStructType(name string) *structType {
    	s := &structType{CommonType{Name: name}, nil}
    	// For historical reasons we set the id here rather than init.
    	// See the comment in newTypeObject for details.
    	setTypeId(s)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 16 02:00:26 UTC 2024
    - 27.2K bytes
    - Viewed (0)
  2. src/internal/reflectlite/type.go

    // ptrType represents a pointer type.
    type ptrType = abi.PtrType
    
    // sliceType represents a slice type.
    type sliceType = abi.SliceType
    
    // structType represents a struct type.
    type structType = abi.StructType
    
    // name is an encoded type name with optional extra data.
    //
    // The first byte is a bit field containing:
    //
    //	1<<0 the name is exported
    //	1<<1 tag data follows the name
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 07 17:01:54 UTC 2024
    - 16.2K bytes
    - Viewed (0)
  3. src/runtime/type.go

    type arraytype = abi.ArrayType
    
    type chantype = abi.ChanType
    
    type slicetype = abi.SliceType
    
    type functype = abi.FuncType
    
    type ptrtype = abi.PtrType
    
    type name = abi.Name
    
    type structtype = abi.StructType
    
    func pkgPath(n name) string {
    	if n.Bytes == nil || *n.Data(0)&(1<<2) == 0 {
    		return ""
    	}
    	i, l := n.ReadVarint(1)
    	off := 1 + i + l
    	if *n.Data(0)&(1<<1) != 0 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:17:26 UTC 2024
    - 12.7K bytes
    - Viewed (0)
  4. src/internal/abi/type.go

    	case Slice:
    		tt := (*SliceType)(unsafe.Pointer(t))
    		return tt.Elem
    	}
    	return nil
    }
    
    // StructType returns t cast to a *StructType, or nil if its tag does not match.
    func (t *Type) StructType() *StructType {
    	if t.Kind() != Struct {
    		return nil
    	}
    	return (*StructType)(unsafe.Pointer(t))
    }
    
    // MapType returns t cast to a *MapType, or nil if its tag does not match.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Apr 17 21:09:59 UTC 2024
    - 21.8K bytes
    - Viewed (0)
  5. staging/src/k8s.io/api/rbac/v1/types.go

    }
    
    // Subject contains a reference to the object or user identities a role binding applies to.  This can either hold a direct API object reference,
    // or a value for non-objects such as user and group names.
    // +structType=atomic
    type Subject struct {
    	// Kind of object being referenced. Values defined by this API group are "User", "Group", and "ServiceAccount".
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu May 23 17:42:49 UTC 2024
    - 10.7K bytes
    - Viewed (0)
  6. src/cmd/compile/internal/types2/typexpr.go

    		// (array composite literals and parameter lists)
    		check.error(e, InvalidDotDotDot, "invalid use of '...'")
    		check.use(e.Elem)
    
    	case *syntax.StructType:
    		typ := new(Struct)
    		setDefType(def, typ)
    		check.structType(typ, e)
    		return typ
    
    	case *syntax.Operation:
    		if e.Op == syntax.Mul && e.Y == nil {
    			typ := new(Pointer)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 16.6K bytes
    - Viewed (0)
  7. src/runtime/alg.go

    	case abi.Array:
    		a := (*arraytype)(unsafe.Pointer(t))
    		for i := uintptr(0); i < a.Len; i++ {
    			h = typehash(a.Elem, add(p, i*a.Elem.Size_), h)
    		}
    		return h
    	case abi.Struct:
    		s := (*structtype)(unsafe.Pointer(t))
    		for _, f := range s.Fields {
    			if f.Name.IsBlank() {
    				continue
    			}
    			h = typehash(f.Typ, add(p, f.Offset), h)
    		}
    		return h
    	default:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 17:58:53 UTC 2024
    - 13.6K bytes
    - Viewed (0)
  8. src/go/internal/gcimporter/ureader.go

    		return r.signature(nil, nil, nil)
    	case pkgbits.TypeSlice:
    		return types.NewSlice(r.typ())
    	case pkgbits.TypeStruct:
    		return r.structType()
    	case pkgbits.TypeInterface:
    		return r.interfaceType()
    	case pkgbits.TypeUnion:
    		return r.unionType()
    	}
    }
    
    func (r *reader) structType() *types.Struct {
    	fields := make([]*types.Var, r.Len())
    	var tags []string
    	for i := range fields {
    		pos := r.pos()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 16.6K bytes
    - Viewed (0)
  9. src/go/types/typexpr.go

    		// (array composite literals and parameter lists)
    		check.error(e, InvalidDotDotDot, "invalid use of '...'")
    		check.use(e.Elt)
    
    	case *ast.StructType:
    		typ := new(Struct)
    		setDefType(def, typ)
    		check.structType(typ, e)
    		return typ
    
    	case *ast.StarExpr:
    		typ := new(Pointer)
    		typ.base = Typ[Invalid] // avoid nil base in invalid recursive type declaration
    		setDefType(def, typ)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 16.3K bytes
    - Viewed (0)
  10. src/go/internal/gcimporter/iimport.go

    	name string
    }
    
    const predeclReserved = 32
    
    type itag uint64
    
    const (
    	// Types
    	definedType itag = iota
    	pointerType
    	sliceType
    	arrayType
    	chanType
    	mapType
    	signatureType
    	structType
    	interfaceType
    	typeParamType
    	instanceType
    	unionType
    )
    
    // iImportData imports a package from the serialized package data
    // and returns the number of bytes consumed and a reference to the package.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 19.2K bytes
    - Viewed (0)
Back to top