- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for MarshalJSON (0.86 sec)
-
istioctl/pkg/util/proto/messageslice.go
) // MessageSlice allows us to marshal slices of protobuf messages like clusters/listeners/routes/endpoints correctly type MessageSlice []proto.Message // MarshalJSON handles marshaling of slices of proto messages func (pSlice MessageSlice) MarshalJSON() ([]byte, error) { buffer := bytes.NewBufferString("[") sliceLength := len(pSlice) for index, msg := range pSlice { b, err := protomarshal.Marshal(msg) if err != nil {
Go - Registered: Wed May 01 22:53:12 GMT 2024 - Last Modified: Tue Oct 19 21:53:59 GMT 2021 - 1.3K bytes - Viewed (0) -
istioctl/pkg/util/clusters/wrapper.go
// Wrapper is a wrapper around the Envoy Clusters // It has extra helper functions for handling any/struct/marshal protobuf pain type Wrapper struct { *admin.Clusters } // MarshalJSON is a custom marshaller to handle protobuf pain func (w *Wrapper) MarshalJSON() ([]byte, error) { return protomarshal.Marshal(w) } // UnmarshalJSON is a custom unmarshaller to handle protobuf pain func (w *Wrapper) UnmarshalJSON(b []byte) error {
Go - Registered: Wed May 01 22:53:12 GMT 2024 - Last Modified: Thu Nov 03 08:41:32 GMT 2022 - 1.2K bytes - Viewed (0)