- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 25 for newStruct (0.13 sec)
-
src/go/types/struct.go
tags []string // field tags; nil if there are no tags } // NewStruct returns a new struct with the given fields and corresponding field tags. // If a field with index i has a tag, tags[i] must be that tag, but len(tags) may be // only as long as required to hold the tag with the largest index i. Consequently, // if no field has a tag, tags may be nil. func NewStruct(fields []*Var, tags []string) *Struct { var fset objset
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Feb 29 22:06:18 UTC 2024 - 6.1K bytes - Viewed (0) -
src/cmd/compile/internal/pkginit/initAsanGlobals.go
nfield(nxp, fname("odrIndicator"), up), }) types.CalcSize(asanGlobal) asanLocation := types.NewStruct([]*types.Field{ nfield(nxp, fname("filename"), up), nfield(nxp, fname("line"), i32), nfield(nxp, fname("column"), i32), }) types.CalcSize(asanLocation) defString := types.NewStruct([]*types.Field{ types.NewField(nxp, fname("data"), up), types.NewField(nxp, fname("len"), up), })
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Aug 17 19:36:24 UTC 2023 - 8.7K bytes - Viewed (0) -
src/cmd/compile/internal/types2/struct.go
tags []string // field tags; nil if there are no tags } // NewStruct returns a new struct with the given fields and corresponding field tags. // If a field with index i has a tag, tags[i] must be that tag, but len(tags) may be // only as long as required to hold the tag with the largest index i. Consequently, // if no field has a tag, tags may be nil. func NewStruct(fields []*Var, tags []string) *Struct { var fset objset
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Feb 29 22:06:18 UTC 2024 - 6.6K bytes - Viewed (0) -
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) -
pilot/pkg/util/protoconv/protoconv.go
return nil } return out } func TypedStructWithFields(typeURL string, fields map[string]interface{}) *anypb.Any { value, err := structpb.NewStruct(fields) if err != nil { log.Error(fmt.Sprintf("error marshaling struct %s: %v", typeURL, err)) } return MessageToAny(&udpa.TypedStruct{ TypeUrl: typeURL, Value: value, }) }
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Fri Feb 02 04:55:40 UTC 2024 - 2.7K bytes - Viewed (0) -
src/cmd/compile/internal/test/abiutilsaux_test.go
fields := make([]*types.Field, len(fieldtypes)) for k, t := range fieldtypes { if t == nil { panic("bad -- field has no type") } f := types.NewField(src.NoXPos, nil, t) fields[k] = f } s := types.NewStruct(fields) return s } func mkFuncType(rcvr *types.Type, ins []*types.Type, outs []*types.Type) *types.Type { q := typecheck.Lookup("?") inf := []*types.Field{} for _, it := range ins {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Sep 13 18:34:00 UTC 2023 - 3.2K bytes - Viewed (0) -
operator/pkg/util/util.go
return x.StringValue case *structpb.Value_NumberValue: return fmt.Sprint(x.NumberValue) default: return v.String() } } func MustStruct(m map[string]any) *structpb.Struct { s, _ := structpb.NewStruct(m) return s
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Tue May 02 13:01:43 UTC 2023 - 3.9K bytes - Viewed (0) -
src/cmd/compile/internal/ssa/deadstore_test.go
if v.Op == OpCopy { t.Errorf("store %s incorrectly removed", v) } } func TestDeadStoreSmallStructInit(t *testing.T) { c := testConfig(t) ptrType := c.config.Types.BytePtr typ := types.NewStruct([]*types.Field{ types.NewField(src.NoXPos, &types.Sym{Name: "A"}, c.config.Types.Int), types.NewField(src.NoXPos, &types.Sym{Name: "B"}, c.config.Types.Int), }) name := c.Temp(typ) fun := c.Fun("entry",
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Apr 25 20:07:26 UTC 2024 - 5.6K bytes - Viewed (0) -
pkg/istio-agent/grpcxds/grpc_bootstrap.go
if err != nil { return nil, err } rawMeta := map[string]any{} if err := json.Unmarshal(bytes, &rawMeta); err != nil { return nil, err } xdsMeta, err := structpb.NewStruct(rawMeta) if err != nil { return nil, err } return xdsMeta, nil } // GenerateBootstrapFile generates and writes atomically as JSON to the given file path.
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Sat Mar 30 00:31:03 UTC 2024 - 7.1K bytes - Viewed (0) -
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)