Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 10 for NewStruct (0.21 sec)

  1. pkg/wasm/convert_test.go

    func messageToStruct(t *testing.T, m proto.Message) *structpb.Struct {
    	st, err := conversion.MessageToStruct(m)
    	if err != nil {
    		t.Fatal(err)
    	}
    	return st
    }
    
    func newStruct(t *testing.T, m map[string]any) *structpb.Struct {
    	st, err := structpb.NewStruct(m)
    	if err != nil {
    		t.Fatal(err)
    	}
    	return st
    }
    
    func messageToAnyWithTypeURL(t *testing.T, msg proto.Message, typeURL string) *anypb.Any {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed Apr 17 20:06:41 UTC 2024
    - 13.6K bytes
    - Viewed (0)
  2. src/go/types/issues_test.go

    	T1 := NewNamed(n1, nil, nil)
    	n2 := NewTypeName(nopos, nil, "T2", nil)
    	T2 := NewNamed(n2, nil, nil)
    	s1 := NewStruct([]*Var{NewField(nopos, nil, "_", T2, false)}, nil)
    	T1.SetUnderlying(s1)
    	s2 := NewStruct([]*Var{NewField(nopos, nil, "_", T2, false)}, nil)
    	s3 := NewStruct([]*Var{NewField(nopos, nil, "_", s2, false)}, nil)
    	T2.SetUnderlying(s3)
    
    	// These calls must terminate (no endless recursion).
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 28.1K bytes
    - Viewed (0)
  3. src/cmd/compile/internal/typecheck/func.go

    		i++
    	}
    	typ := types.NewStruct(fields)
    	typ.SetNoalg(true)
    	return typ
    }
    
    // MethodValueType returns the struct type used to hold all the information
    // needed in the closure for a OMETHVALUE node. The address of a variable of
    // the returned type can be cast to a func.
    func MethodValueType(n *ir.SelectorExpr) *types.Type {
    	t := types.NewStruct([]*types.Field{
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Mar 06 15:23:18 UTC 2024
    - 21.1K bytes
    - Viewed (0)
  4. src/cmd/compile/internal/types2/issues_test.go

    	T1 := NewNamed(n1, nil, nil)
    	n2 := NewTypeName(nopos, nil, "T2", nil)
    	T2 := NewNamed(n2, nil, nil)
    	s1 := NewStruct([]*Var{NewField(nopos, nil, "_", T2, false)}, nil)
    	T1.SetUnderlying(s1)
    	s2 := NewStruct([]*Var{NewField(nopos, nil, "_", T2, false)}, nil)
    	s3 := NewStruct([]*Var{NewField(nopos, nil, "_", s2, false)}, nil)
    	T2.SetUnderlying(s3)
    
    	// These calls must terminate (no endless recursion).
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 28.1K bytes
    - Viewed (0)
  5. security/pkg/server/ca/server_test.go

    			}
    
    			if server.nodeAuthorizer != nil {
    				for _, c := range server.nodeAuthorizer.component.All() {
    					kube.WaitForCacheSync("test", stop, c.pods.HasSynced)
    				}
    			}
    
    			reqMeta, _ := structpb.NewStruct(map[string]any{
    				security.ImpersonatedIdentity: c.impersonatePod.Identity(),
    			})
    			request := &pb.IstioCertificateRequest{
    				Csr:      "dumb CSR",
    				Metadata: reqMeta,
    			}
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed Feb 28 16:41:38 UTC 2024
    - 15.8K bytes
    - Viewed (0)
  6. src/cmd/compile/internal/typecheck/builtin.go

    	typs[104] = newSig(params(typs[103], typs[3]), nil)
    	typs[105] = newSig(params(typs[103]), nil)
    	typs[106] = newSig(params(typs[2]), params(typs[15]))
    	typs[107] = types.NewArray(typs[0], 3)
    	typs[108] = types.NewStruct([]*types.Field{types.NewField(src.NoXPos, Lookup("enabled"), typs[6]), types.NewField(src.NoXPos, Lookup("pad"), typs[107]), types.NewField(src.NoXPos, Lookup("cgo"), typs[6]), types.NewField(src.NoXPos, Lookup("alignme"), typs[24])})
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 21 21:08:03 UTC 2024
    - 16.2K bytes
    - Viewed (0)
  7. src/go/internal/gcimporter/ureader.go

    		fields[i] = types.NewField(pos, pkg, name, ftyp, embedded)
    		if tag != "" {
    			for len(tags) < i {
    				tags = append(tags, "")
    			}
    			tags = append(tags, tag)
    		}
    	}
    	return types.NewStruct(fields, tags)
    }
    
    func (r *reader) unionType() *types.Union {
    	terms := make([]*types.Term, r.Len())
    	for i := range terms {
    		terms[i] = types.NewTerm(r.Bool(), r.typ())
    	}
    	return types.NewUnion(terms)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 16.6K bytes
    - Viewed (0)
  8. src/go/internal/gcimporter/iimport.go

    			fname := r.ident()
    			ftyp := r.typ()
    			emb := r.bool()
    			tag := r.string()
    
    			fields[i] = types.NewField(fpos, r.currPkg, fname, ftyp, emb)
    			tags[i] = tag
    		}
    		return types.NewStruct(fields, tags)
    
    	case interfaceType:
    		r.currPkg = r.pkg()
    
    		embeddeds := make([]types.Type, r.uint64())
    		for i := range embeddeds {
    			_ = r.pos()
    			embeddeds[i] = r.typ()
    		}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 19.2K bytes
    - Viewed (0)
  9. pilot/pkg/networking/util/util.go

    	m := map[string]interface{}{
    		// logical destination behind the tunnel, on which policy and telemetry will be applied
    		"local": net.JoinHostPort(address, strconv.Itoa(port)),
    	}
    	st, _ := structpb.NewStruct(m)
    	return st
    }
    
    func BuildStatefulSessionFilter(svc *model.Service) *hcm.HttpFilter {
    	filterConfig := MaybeBuildStatefulSessionFilterConfig(svc)
    	if filterConfig == nil {
    		return nil
    	}
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Jun 13 01:56:28 UTC 2024
    - 28.5K bytes
    - Viewed (0)
  10. src/go/internal/gccgoimporter/parser.go

    	for p.tok != '}' && p.tok != scanner.EOF {
    		field, tag := p.parseField(pkg)
    		p.expect(';')
    		fields = append(fields, field)
    		tags = append(tags, tag)
    	}
    	p.expect('}')
    
    	*t = *types.NewStruct(fields, tags)
    	return t
    }
    
    // ParamList = "(" [ { Parameter "," } Parameter ] ")" .
    func (p *parser) parseParamList(pkg *types.Package) (*types.Tuple, bool) {
    	var list []*types.Var
    	isVariadic := false
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Feb 02 23:14:07 UTC 2024
    - 31.2K bytes
    - Viewed (0)
Back to top