mirror of https://github.com/helm/helm
fix: align toToml error behavior with toYaml and toJson (closes #31430)
toToml was returning err.Error() on marshal failure, while toYaml and toJson return an empty string. This caused confusing template output when marshaling fails (e.g. a struct with cyclic references). Changes: - toTOML now returns "" on error, consistent with toYAML and toJSON - Added mustToTOML which panics on error, consistent with mustToYAML and mustToJSON (allows templates to opt-in to strict error handling) - Registered mustToToml in funcMap - Added test cases for toToml error swallowing and mustToToml panic Signed-off-by: Aliipou <Alipourrahim.ap@gmail.com>pull/31950/head
parent
42f78ba60e
commit
04bca414ad
Loading…
Reference in new issue