- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 28 for MarshalIndent (0.3 sec)
-
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 Apr 24 22:53:08 GMT 2024 - Last Modified: Fri Jan 26 20:34:28 GMT 2024 - 3.6K bytes - Viewed (0) -
docs/debugging/healing-bin/main.go
Go - Registered: Sun Apr 21 19:28:08 GMT 2024 - Last Modified: Mon Sep 19 18:05:16 GMT 2022 - 3.2K bytes - Viewed (0) -
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 Apr 24 22:53:08 GMT 2024 - Last Modified: Tue Dec 13 01:08:07 GMT 2022 - 1.9K 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 Apr 24 22:53:08 GMT 2024 - Last Modified: Tue Apr 23 21:30:30 GMT 2024 - 2.8K 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 Apr 24 22:53:08 GMT 2024 - Last Modified: Tue Apr 23 21:30:30 GMT 2024 - 2.5K 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 Apr 24 22:53:08 GMT 2024 - Last Modified: Fri Apr 21 14:17:23 GMT 2023 - 4.1K bytes - Viewed (0) -
istioctl/pkg/writer/ztunnel/configdump/connections.go
}) workloads = slices.FilterInPlace(workloads, func(state WorkloadState) bool { if filter.Namespace != "" && filter.Namespace != state.Info.Namespace { return false } return true }) out, err := json.MarshalIndent(workloads, "", " ") 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 Apr 24 22:53:08 GMT 2024 - Last Modified: Mon Apr 22 15:39:28 GMT 2024 - 3.3K 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 Apr 24 22:53:08 GMT 2024 - Last Modified: Fri Mar 15 04:16:55 GMT 2024 - 6.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 Apr 24 22:53:08 GMT 2024 - Last Modified: Tue Jul 11 02:41:45 GMT 2023 - 3.1K bytes - Viewed (0) -
istioctl/pkg/writer/envoy/configdump/cluster.go
filteredClusters := make(proto.MessageSlice, 0, len(clusters)) for _, cluster := range clusters { if filter.Verify(cluster) { filteredClusters = append(filteredClusters, cluster) } } 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 Apr 24 22:53:08 GMT 2024 - Last Modified: Thu May 11 05:38:17 GMT 2023 - 5.9K bytes - Viewed (0)