- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 19 for MarshalIndent (0.22 sec)
-
istioctl/pkg/writer/envoy/configdump/ecds_test.go
assert.NoError(t, err) // protojson opt out of whitespace randomization, see more details: https://github.com/golang/protobuf/issues/1082 var rm json.RawMessage = gotOut.Bytes() jsonOutput, err := json.MarshalIndent(rm, "", " ") if err != nil { assert.NoError(t, err) } jsonOutput = append(jsonOutput, '\n') util.CompareContent(t, jsonOutput, "testdata/ecds/output.json")
Go - Registered: Wed May 01 22:53:12 GMT 2024 - Last Modified: Tue Dec 13 01:08:07 GMT 2022 - 1.9K bytes - Viewed (0) -
istioctl/pkg/writer/ztunnel/configdump/policies.go
slices.SortFunc(policies, func(a, b *ZtunnelPolicy) int { if r := cmp.Compare(a.Namespace, b.Namespace); r != 0 { return r } return cmp.Compare(a.Name, b.Name) }) out, err := json.MarshalIndent(policies, "", " ") if err != nil { return fmt.Errorf("failed to marshal policies: %v", err) } if outputFormat == "yaml" { if out, err = yaml.JSONToYAML(out); err != nil { return err } }
Go - Registered: Wed May 01 22:53:12 GMT 2024 - Last Modified: Tue Apr 23 21:30:30 GMT 2024 - 2.5K bytes - Viewed (0) -
istioctl/pkg/writer/pilot/status.go
} sort.Slice(fullStatus, func(i, j int) bool { return fullStatus[i].proxyID < fullStatus[j].proxyID }) } } if len(mappedResp) > 0 { mresp, err := json.MarshalIndent(mappedResp, "", " ") if err != nil { return nil, nil, err } _, _ = s.Writer.Write(mresp) _, _ = s.Writer.Write([]byte("\n")) } return w, fullStatus, nil }
Go - Registered: Wed May 01 22:53:12 GMT 2024 - Last Modified: Fri Mar 15 04:16:55 GMT 2024 - 6.1K bytes - Viewed (0) -
cni/pkg/util/pluginutil.go
return } return } // Marshal the CNI config map and append a new line func MarshalCNIConfig(cniConfigMap map[string]any) ([]byte, error) { cniConfig, err := json.MarshalIndent(cniConfigMap, "", " ") if err != nil { return nil, err } cniConfig = append(cniConfig, "\n"...) return cniConfig, nil
Go - Registered: Wed May 01 22:53:12 GMT 2024 - Last Modified: Fri Jan 26 20:34:28 GMT 2024 - 3.6K bytes - Viewed (0) -
istioctl/pkg/writer/compare/sds/writer.go
} return tw.Flush() } // printSecretItemsJSON prints secret in JSON format, and dumps the raw certificate data with the output func (w *sdsWriter) printSecretItemsJSON(secrets []SecretItem) error { out, err := json.MarshalIndent(secrets, "", " ") if err != nil { return err } _, err = w.w.Write(out) if err != nil { return err } return nil }
Go - Registered: Wed May 01 22:53:12 GMT 2024 - Last Modified: Fri Apr 21 14:17:23 GMT 2023 - 4.1K bytes - Viewed (0) -
istioctl/pkg/util/formatting/formatter.go
for _, m := range ms { logOutput = append(logOutput, render(m, colorize)) } return strings.Join(logOutput, "\n") } func printJSON(ms diag.Messages) (string, error) { jsonOutput, err := json.MarshalIndent(ms, "", "\t") return string(jsonOutput), err } func printYAML(ms diag.Messages) (string, error) { yamlOutput, err := yaml.Marshal(ms) return string(yamlOutput), err } // Formatting options for Message
Go - Registered: Wed May 01 22:53:12 GMT 2024 - Last Modified: Tue Jul 11 02:41:45 GMT 2023 - 3.1K bytes - Viewed (0) -
istioctl/pkg/writer/ztunnel/configdump/certificates.go
func (c *ConfigWriter) PrintSecretDump(outputFormat string) error { if c.ztunnelDump == nil { return fmt.Errorf("config writer has not been primed") } secretDump := c.ztunnelDump.Certificates out, err := json.MarshalIndent(secretDump, "", " ") if err != nil { return fmt.Errorf("failed to marshal secrets dump: %v", err) } if outputFormat == "yaml" { if out, err = yaml.JSONToYAML(out); err != nil { return err } }
Go - Registered: Wed May 01 22:53:12 GMT 2024 - Last Modified: Thu Apr 25 16:38:16 GMT 2024 - 3.2K bytes - Viewed (0) -
istioctl/pkg/writer/ztunnel/configdump/workload.go
filteredWorkloads := []*ZtunnelWorkload{} for _, workload := range zDump.Workloads { if filter.Verify(workload) { filteredWorkloads = append(filteredWorkloads, workload) } } out, err := json.MarshalIndent(filteredWorkloads, "", " ") if err != nil { return fmt.Errorf("failed to marshal workloads: %v", err) } if outputFormat == "yaml" { if out, err = yaml.JSONToYAML(out); err != nil { return err
Go - Registered: Wed May 01 22:53:12 GMT 2024 - Last Modified: Tue Apr 23 21:30:30 GMT 2024 - 4K bytes - Viewed (0) -
istioctl/pkg/writer/ztunnel/configdump/services.go
if r := cmp.Compare(a.Namespace, b.Namespace); r != 0 { return r } if r := cmp.Compare(a.Name, b.Name); r != 0 { return r } return cmp.Compare(a.Hostname, b.Hostname) }) out, err := json.MarshalIndent(svcs, "", " ") if err != nil { return fmt.Errorf("failed to marshal workloads: %v", err) } if outputFormat == "yaml" { if out, err = yaml.JSONToYAML(out); err != nil { return err } }
Go - Registered: Wed May 01 22:53:12 GMT 2024 - Last Modified: Tue Apr 23 21:30:30 GMT 2024 - 2.8K bytes - Viewed (0) -
istioctl/pkg/writer/envoy/clusters/clusters.go
for _, host := range cluster.HostStatuses { if filter.Verify(host, cluster.Name) { filteredClusters = append(filteredClusters, cluster) break } } } out, err := json.MarshalIndent(filteredClusters, "", " ") if err != nil { return err } if outputFormat == "yaml" { if out, err = yaml.JSONToYAML(out); err != nil { return err } }
Go - Registered: Wed May 01 22:53:12 GMT 2024 - Last Modified: Thu Nov 03 08:41:32 GMT 2022 - 5.8K bytes - Viewed (0)