- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 32 for jsonToYAML (0.36 sec)
-
pkg/test/util/yml/apply.go
if err != nil { return "", fmt.Errorf("json merge error (%s) for base object: \n%s\n override object: \n%s", err, mainYaml, overlayYaml) } resYaml, err := yaml.JSONToYAML(merged) if err != nil { return "", fmt.Errorf("jsonToYAML error (%s) for merged object: \n%s", err, merged) } return string(resYaml), nil } // MustApplyNamespace applies the given namespaces to the resources in the yamlText if not set.
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Tue Oct 17 07:02:38 UTC 2023 - 3.8K bytes - Viewed (0) -
operator/cmd/mesh/operator_test.go
t.Error(err) } } wantJSON, err := readFile(goldenFilepath) if err != nil { t.Fatal(err) } var want, got []byte if got, err = yaml.JSONToYAML([]byte(gotJSON)); err != nil { t.Fatal(err) } if want, err = yaml.JSONToYAML([]byte(wantJSON)); err != nil { t.Fatal(err) } if diff := util.YAMLDiff(string(want), string(got)); diff != "" { t.Fatalf("diff: %s", diff) } }
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Tue Aug 29 14:15:33 UTC 2023 - 6.4K bytes - Viewed (0) -
operator/pkg/util/yaml.go
if err != nil { return "", fmt.Errorf("json merge error (%s) for base object: \n%s\n override object: \n%s", err, bj, oj) } my, err := yaml.JSONToYAML(merged) if err != nil { return "", fmt.Errorf("jsonToYAML error (%s) for merged object: \n%s", err, merged) } return string(my), nil } // yamlDiff compares single YAML file func yamlDiff(a, b string) string {
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Sat Jan 14 02:41:27 UTC 2023 - 7.2K bytes - Viewed (0) -
istioctl/pkg/writer/ztunnel/configdump/policies.go
}) 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 } } fmt.Fprintln(c.Stdout, string(out)) return nil
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Fri May 31 21:45:11 UTC 2024 - 2.4K bytes - Viewed (0) -
istioctl/pkg/writer/envoy/configdump/configdump.go
out, err := protomarshal.ToJSONWithIndent(bootstrapDump, " ") if err != nil { return fmt.Errorf("unable to marshal bootstrap in Envoy config dump: %v", err) } if outputFormat == "yaml" { outbyte, err := yaml.JSONToYAML([]byte(out)) if err != nil { return err } out = string(outbyte) } fmt.Fprintln(c.Stdout, out) return nil } // PrintSecretDump prints just the secret config dump to the ConfigWriter stdout
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Thu Feb 29 20:46:41 UTC 2024 - 7.4K bytes - Viewed (0) -
istioctl/pkg/writer/ztunnel/configdump/services.go
}) 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 } } fmt.Fprintln(c.Stdout, string(out)) return nil
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Fri May 31 21:45:11 UTC 2024 - 2.7K bytes - Viewed (0) -
staging/src/k8s.io/apimachinery/pkg/util/jsonmergepatch/patch_test.go
} func jsonToYAMLOrError(j []byte) string { y, err := jsonToYAML(j) if err != nil { return err.Error() } return string(y) } func toJSON(v interface{}) ([]byte, error) { j, err := json.Marshal(v) if err != nil { return nil, fmt.Errorf("json marshal failed: %v\n%v\n", err, dump.Pretty(v)) } return j, nil } func jsonToYAML(j []byte) ([]byte, error) { y, err := yaml.JSONToYAML(j)
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue May 28 08:48:22 UTC 2024 - 14.8K bytes - Viewed (0) -
istioctl/pkg/writer/envoy/configdump/ecds.go
if err != nil { return err } out, err := protomarshal.MarshalIndentWithGlobalTypesResolver(dump, " ") if err != nil { return err } if outputFormat == "yaml" { if out, err = yaml.JSONToYAML(out); err != nil { return err } } _, _ = fmt.Fprintln(c.Stdout, string(out)) return nil } func (c *ConfigWriter) PrintEcdsSummary() error {
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Sat Jan 14 02:41:27 UTC 2023 - 2.6K bytes - Viewed (0) -
staging/src/k8s.io/cli-runtime/pkg/printers/yaml.go
return fmt.Errorf(InternalObjectPrinterErr) } data, err := yaml.Marshal(obj) if err != nil { return err } _, err = w.Write(data) return err case *runtime.Unknown: data, err := yaml.JSONToYAML(obj.Raw) if err != nil { return err } _, err = w.Write(data) return err } if obj.GetObjectKind().GroupVersionKind().Empty() {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Jun 02 14:15:25 UTC 2022 - 2.5K bytes - Viewed (0) -
istioctl/pkg/writer/ztunnel/configdump/connections.go
} 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 } } fmt.Fprintln(c.Stdout, string(out)) return nil } func (c *ConfigWriter) PrintConnectionsSummary(filter ConnectionsFilter) error { w := c.tabwriter()
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Fri May 31 21:45:11 UTC 2024 - 3.5K bytes - Viewed (0)